1   # 0 "ssl/ssl_lib.c"
2   # 0 "<built-in>"
3   # 0 "<command-line>"
4   # 1 "/usr/include/stdc-predef.h" 1 3 4
5   # 0 "<command-line>" 2
6   # 1 "ssl/ssl_lib.c"
7   # 12 "ssl/ssl_lib.c"
8   # 1 "/usr/include/stdio.h" 1 3 4
9   # 27 "/usr/include/stdio.h" 3 4
10   # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4
11   # 33 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4
12   # 1 "/usr/include/features.h" 1 3 4
13   # 392 "/usr/include/features.h" 3 4
14   # 1 "/usr/include/features-time64.h" 1 3 4
15   # 20 "/usr/include/features-time64.h" 3 4
16   # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
17   # 21 "/usr/include/features-time64.h" 2 3 4
18   # 1 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 1 3 4
19   # 19 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 3 4
20   # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
21   # 20 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 2 3 4
22   # 22 "/usr/include/features-time64.h" 2 3 4
23   # 393 "/usr/include/features.h" 2 3 4
24   # 486 "/usr/include/features.h" 3 4
25   # 1 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 1 3 4
26   # 559 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4
27   # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
28   # 560 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4
29   # 1 "/usr/include/x86_64-linux-gnu/bits/long-double.h" 1 3 4
30   # 561 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4
31   # 487 "/usr/include/features.h" 2 3 4
32   # 510 "/usr/include/features.h" 3 4
33   # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 1 3 4
34   # 10 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4
35   # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs-64.h" 1 3 4
36   # 11 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 2 3 4
37   # 511 "/usr/include/features.h" 2 3 4
38   # 34 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 2 3 4
39   # 28 "/usr/include/stdio.h" 2 3 4
40   
41   
42   
43   
44   
45   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 1 3 4
46   # 209 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 3 4
47   
48   # 209 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 3 4
49   typedef long unsigned int size_t;
50   # 34 "/usr/include/stdio.h" 2 3 4
51   
52   
53   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h" 1 3 4
54   # 40 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h" 3 4
55   typedef __builtin_va_list __gnuc_va_list;
56   # 37 "/usr/include/stdio.h" 2 3 4
57   
58   # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4
59   # 27 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4
60   # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
61   # 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4
62   # 1 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 1 3 4
63   # 19 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 3 4
64   # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
65   # 20 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 2 3 4
66   # 29 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4
67   
68   
69   typedef unsigned char __u_char;
70   typedef unsigned short int __u_short;
71   typedef unsigned int __u_int;
72   typedef unsigned long int __u_long;
73   
74   
75   typedef signed char __int8_t;
76   typedef unsigned char __uint8_t;
77   typedef signed short int __int16_t;
78   typedef unsigned short int __uint16_t;
79   typedef signed int __int32_t;
80   typedef unsigned int __uint32_t;
81   
82   typedef signed long int __int64_t;
83   typedef unsigned long int __uint64_t;
84   
85   
86   
87   
88   
89   
90   typedef __int8_t __int_least8_t;
91   typedef __uint8_t __uint_least8_t;
92   typedef __int16_t __int_least16_t;
93   typedef __uint16_t __uint_least16_t;
94   typedef __int32_t __int_least32_t;
95   typedef __uint32_t __uint_least32_t;
96   typedef __int64_t __int_least64_t;
97   typedef __uint64_t __uint_least64_t;
98   
99   
100   
101   typedef long int __quad_t;
102   typedef unsigned long int __u_quad_t;
103   
104   
105   
106   
107   
108   
109   
110   typedef long int __intmax_t;
111   typedef unsigned long int __uintmax_t;
112   # 141 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4
113   # 1 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 1 3 4
114   # 142 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4
115   # 1 "/usr/include/x86_64-linux-gnu/bits/time64.h" 1 3 4
116   # 143 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4
117   
118   
119   typedef unsigned long int __dev_t;
120   typedef unsigned int __uid_t;
121   typedef unsigned int __gid_t;
122   typedef unsigned long int __ino_t;
123   typedef unsigned long int __ino64_t;
124   typedef unsigned int __mode_t;
125   typedef unsigned long int __nlink_t;
126   typedef long int __off_t;
127   typedef long int __off64_t;
128   typedef int __pid_t;
129   typedef struct { int __val[2]; } __fsid_t;
130   typedef long int __clock_t;
131   typedef unsigned long int __rlim_t;
132   typedef unsigned long int __rlim64_t;
133   typedef unsigned int __id_t;
134   typedef long int __time_t;
135   typedef unsigned int __useconds_t;
136   typedef long int __suseconds_t;
137   typedef long int __suseconds64_t;
138   
139   typedef int __daddr_t;
140   typedef int __key_t;
141   
142   
143   typedef int __clockid_t;
144   
145   
146   typedef void * __timer_t;
147   
148   
149   typedef long int __blksize_t;
150   
151   
152   
153   
154   typedef long int __blkcnt_t;
155   typedef long int __blkcnt64_t;
156   
157   
158   typedef unsigned long int __fsblkcnt_t;
159   typedef unsigned long int __fsblkcnt64_t;
160   
161   
162   typedef unsigned long int __fsfilcnt_t;
163   typedef unsigned long int __fsfilcnt64_t;
164   
165   
166   typedef long int __fsword_t;
167   
168   typedef long int __ssize_t;
169   
170   
171   typedef long int __syscall_slong_t;
172   
173   typedef unsigned long int __syscall_ulong_t;
174   
175   
176   
177   typedef __off64_t __loff_t;
178   typedef char *__caddr_t;
179   
180   
181   typedef long int __intptr_t;
182   
183   
184   typedef unsigned int __socklen_t;
185   
186   
187   
188   
189   typedef int __sig_atomic_t;
190   # 39 "/usr/include/stdio.h" 2 3 4
191   # 1 "/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h" 1 3 4
192   
193   
194   
195   
196   # 1 "/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h" 1 3 4
197   # 13 "/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h" 3 4
198   typedef struct
199   {
200     int __count;
201     union
202     {
203       unsigned int __wch;
204       char __wchb[4];
205     } __value;
206   } __mbstate_t;
207   # 6 "/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h" 2 3 4
208   
209   
210   
211   
212   typedef struct _G_fpos_t
213   {
214     __off_t __pos;
215     __mbstate_t __state;
216   } __fpos_t;
217   # 40 "/usr/include/stdio.h" 2 3 4
218   # 1 "/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h" 1 3 4
219   # 10 "/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h" 3 4
220   typedef struct _G_fpos64_t
221   {
222     __off64_t __pos;
223     __mbstate_t __state;
224   } __fpos64_t;
225   # 41 "/usr/include/stdio.h" 2 3 4
226   # 1 "/usr/include/x86_64-linux-gnu/bits/types/__FILE.h" 1 3 4
227   
228   
229   
230   struct _IO_FILE;
231   typedef struct _IO_FILE __FILE;
232   # 42 "/usr/include/stdio.h" 2 3 4
233   # 1 "/usr/include/x86_64-linux-gnu/bits/types/FILE.h" 1 3 4
234   
235   
236   
237   struct _IO_FILE;
238   
239   
240   typedef struct _IO_FILE FILE;
241   # 43 "/usr/include/stdio.h" 2 3 4
242   # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h" 1 3 4
243   # 35 "/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h" 3 4
244   struct _IO_FILE;
245   struct _IO_marker;
246   struct _IO_codecvt;
247   struct _IO_wide_data;
248   
249   
250   
251   
252   typedef void _IO_lock_t;
253   
254   
255   
256   
257   
258   struct _IO_FILE
259   {
260     int _flags;
261   
262   
263     char *_IO_read_ptr;
264     char *_IO_read_end;
265     char *_IO_read_base;
266     char *_IO_write_base;
267     char *_IO_write_ptr;
268     char *_IO_write_end;
269     char *_IO_buf_base;
270     char *_IO_buf_end;
271   
272   
273     char *_IO_save_base;
274     char *_IO_backup_base;
275     char *_IO_save_end;
276   
277     struct _IO_marker *_markers;
278   
279     struct _IO_FILE *_chain;
280   
281     int _fileno;
282     int _flags2;
283     __off_t _old_offset;
284   
285   
286     unsigned short _cur_column;
287     signed char _vtable_offset;
288     char _shortbuf[1];
289   
290     _IO_lock_t *_lock;
291   
292   
293   
294   
295   
296   
297   
298     __off64_t _offset;
299   
300     struct _IO_codecvt *_codecvt;
301     struct _IO_wide_data *_wide_data;
302     struct _IO_FILE *_freeres_list;
303     void *_freeres_buf;
304     size_t __pad5;
305     int _mode;
306   
307     char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
308   };
309   # 44 "/usr/include/stdio.h" 2 3 4
310   # 52 "/usr/include/stdio.h" 3 4
311   typedef __gnuc_va_list va_list;
312   # 63 "/usr/include/stdio.h" 3 4
313   typedef __off_t off_t;
314   # 77 "/usr/include/stdio.h" 3 4
315   typedef __ssize_t ssize_t;
316   
317   
318   
319   
320   
321   
322   typedef __fpos_t fpos_t;
323   # 133 "/usr/include/stdio.h" 3 4
324   # 1 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 1 3 4
325   # 134 "/usr/include/stdio.h" 2 3 4
326   # 143 "/usr/include/stdio.h" 3 4
327   extern FILE *stdin;
328   extern FILE *stdout;
329   extern FILE *stderr;
330   
331   
332   
333   
334   
335   
336   extern int remove (const char *__filename) __attribute__ ((__nothrow__ , __leaf__));
337   
338   extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ , __leaf__));
339   
340   
341   
342   extern int renameat (int __oldfd, const char *__old, int __newfd,
343          const char *__new) __attribute__ ((__nothrow__ , __leaf__));
344   # 178 "/usr/include/stdio.h" 3 4
345   extern int fclose (FILE *__stream);
346   # 188 "/usr/include/stdio.h" 3 4
347   extern FILE *tmpfile (void)
348     __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__));
349   # 205 "/usr/include/stdio.h" 3 4
350   extern char *tmpnam (char[20]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
351   
352   
353   
354   
355   extern char *tmpnam_r (char __s[20]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
356   # 222 "/usr/include/stdio.h" 3 4
357   extern char *tempnam (const char *__dir, const char *__pfx)
358      __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__malloc__ (__builtin_free, 1)));
359   
360   
361   
362   
363   
364   
365   extern int fflush (FILE *__stream);
366   # 239 "/usr/include/stdio.h" 3 4
367   extern int fflush_unlocked (FILE *__stream);
368   # 258 "/usr/include/stdio.h" 3 4
369   extern FILE *fopen (const char *__restrict __filename,
370         const char *__restrict __modes)
371     __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__));
372   
373   
374   
375   
376   extern FILE *freopen (const char *__restrict __filename,
377           const char *__restrict __modes,
378           FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
379   # 293 "/usr/include/stdio.h" 3 4
380   extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ , __leaf__))
381     __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__));
382   # 308 "/usr/include/stdio.h" 3 4
383   extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
384     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__));
385   
386   
387   
388   
389   extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ , __leaf__))
390     __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (fclose, 1))) __attribute__ ((__warn_unused_result__));
391   # 328 "/usr/include/stdio.h" 3 4
392   extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
393   
394   
395   
396   extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
397         int __modes, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
398   
399   
400   
401   
402   extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
403            size_t __size) __attribute__ ((__nothrow__ , __leaf__));
404   
405   
406   extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
407   
408   
409   
410   
411   
412   
413   
414   extern int fprintf (FILE *__restrict __stream,
415         const char *__restrict __format, ...);
416   
417   
418   
419   
420   extern int printf (const char *__restrict __format, ...);
421   
422   extern int sprintf (char *__restrict __s,
423         const char *__restrict __format, ...) __attribute__ ((__nothrow__));
424   
425   
426   
427   
428   
429   extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,
430          __gnuc_va_list __arg);
431   
432   
433   
434   
435   extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);
436   
437   extern int vsprintf (char *__restrict __s, const char *__restrict __format,
438          __gnuc_va_list __arg) __attribute__ ((__nothrow__));
439   
440   
441   
442   extern int snprintf (char *__restrict __s, size_t __maxlen,
443          const char *__restrict __format, ...)
444        __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
445   
446   extern int vsnprintf (char *__restrict __s, size_t __maxlen,
447           const char *__restrict __format, __gnuc_va_list __arg)
448        __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
449   # 403 "/usr/include/stdio.h" 3 4
450   extern int vdprintf (int __fd, const char *__restrict __fmt,
451          __gnuc_va_list __arg)
452        __attribute__ ((__format__ (__printf__, 2, 0)));
453   extern int dprintf (int __fd, const char *__restrict __fmt, ...)
454        __attribute__ ((__format__ (__printf__, 2, 3)));
455   
456   
457   
458   
459   
460   
461   
462   extern int fscanf (FILE *__restrict __stream,
463        const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
464   
465   
466   
467   
468   extern int scanf (const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
469   
470   extern int sscanf (const char *__restrict __s,
471        const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__));
472   
473   
474   
475   
476   
477   # 1 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 1 3 4
478   # 119 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4
479   # 1 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 1 3 4
480   # 24 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4
481   # 1 "/usr/include/x86_64-linux-gnu/bits/long-double.h" 1 3 4
482   # 25 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 2 3 4
483   # 120 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 2 3 4
484   # 431 "/usr/include/stdio.h" 2 3 4
485   
486   
487   
488   extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf")
489   
490                             __attribute__ ((__warn_unused_result__));
491   extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf")
492                            __attribute__ ((__warn_unused_result__));
493   extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__ , __leaf__))
494   
495                         ;
496   # 459 "/usr/include/stdio.h" 3 4
497   extern int vfscanf (FILE *__restrict __s, const char *__restrict __format,
498         __gnuc_va_list __arg)
499        __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__));
500   
501   
502   
503   
504   
505   extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg)
506        __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__));
507   
508   
509   extern int vsscanf (const char *__restrict __s,
510         const char *__restrict __format, __gnuc_va_list __arg)
511        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__scanf__, 2, 0)));
512   
513   
514   
515   
516   
517   extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf")
518   
519   
520   
521        __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__));
522   extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf")
523   
524        __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__));
525   extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__ , __leaf__))
526   
527   
528   
529        __attribute__ ((__format__ (__scanf__, 2, 0)));
530   # 513 "/usr/include/stdio.h" 3 4
531   extern int fgetc (FILE *__stream);
532   extern int getc (FILE *__stream);
533   
534   
535   
536   
537   
538   extern int getchar (void);
539   
540   
541   
542   
543   
544   
545   extern int getc_unlocked (FILE *__stream);
546   extern int getchar_unlocked (void);
547   # 538 "/usr/include/stdio.h" 3 4
548   extern int fgetc_unlocked (FILE *__stream);
549   # 549 "/usr/include/stdio.h" 3 4
550   extern int fputc (int __c, FILE *__stream);
551   extern int putc (int __c, FILE *__stream);
552   
553   
554   
555   
556   
557   extern int putchar (int __c);
558   # 565 "/usr/include/stdio.h" 3 4
559   extern int fputc_unlocked (int __c, FILE *__stream);
560   
561   
562   
563   
564   
565   
566   
567   extern int putc_unlocked (int __c, FILE *__stream);
568   extern int putchar_unlocked (int __c);
569   
570   
571   
572   
573   
574   
575   extern int getw (FILE *__stream);
576   
577   
578   extern int putw (int __w, FILE *__stream);
579   
580   
581   
582   
583   
584   
585   
586   extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
587        __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
588   # 632 "/usr/include/stdio.h" 3 4
589   extern __ssize_t __getdelim (char **__restrict __lineptr,
590                                size_t *__restrict __n, int __delimiter,
591                                FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
592   extern __ssize_t getdelim (char **__restrict __lineptr,
593                              size_t *__restrict __n, int __delimiter,
594                              FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
595   
596   
597   
598   
599   
600   
601   
602   extern __ssize_t getline (char **__restrict __lineptr,
603                             size_t *__restrict __n,
604                             FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
605   
606   
607   
608   
609   
610   
611   
612   extern int fputs (const char *__restrict __s, FILE *__restrict __stream);
613   
614   
615   
616   
617   
618   extern int puts (const char *__s);
619   
620   
621   
622   
623   
624   
625   extern int ungetc (int __c, FILE *__stream);
626   
627   
628   
629   
630   
631   
632   extern size_t fread (void *__restrict __ptr, size_t __size,
633          size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
634   
635   
636   
637   
638   extern size_t fwrite (const void *__restrict __ptr, size_t __size,
639           size_t __n, FILE *__restrict __s);
640   # 702 "/usr/include/stdio.h" 3 4
641   extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
642            size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
643   extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
644             size_t __n, FILE *__restrict __stream);
645   
646   
647   
648   
649   
650   
651   
652   extern int fseek (FILE *__stream, long int __off, int __whence);
653   
654   
655   
656   
657   extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__));
658   
659   
660   
661   
662   extern void rewind (FILE *__stream);
663   # 736 "/usr/include/stdio.h" 3 4
664   extern int fseeko (FILE *__stream, __off_t __off, int __whence);
665   
666   
667   
668   
669   extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__));
670   # 760 "/usr/include/stdio.h" 3 4
671   extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
672   
673   
674   
675   
676   extern int fsetpos (FILE *__stream, const fpos_t *__pos);
677   # 786 "/usr/include/stdio.h" 3 4
678   extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
679   
680   extern int feof (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
681   
682   extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
683   
684   
685   
686   extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
687   extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
688   extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
689   
690   
691   
692   
693   
694   
695   
696   extern void perror (const char *__s);
697   
698   
699   
700   
701   extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
702   
703   
704   
705   
706   extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
707   # 823 "/usr/include/stdio.h" 3 4
708   extern int pclose (FILE *__stream);
709   
710   
711   
712   
713   
714   extern FILE *popen (const char *__command, const char *__modes)
715     __attribute__ ((__malloc__)) __attribute__ ((__malloc__ (pclose, 1))) __attribute__ ((__warn_unused_result__));
716   
717   
718   
719   
720   
721   
722   extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__))
723     __attribute__ ((__access__ (__write_only__, 1)));
724   # 867 "/usr/include/stdio.h" 3 4
725   extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
726   
727   
728   
729   extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
730   
731   
732   extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
733   # 885 "/usr/include/stdio.h" 3 4
734   extern int __uflow (FILE *);
735   extern int __overflow (FILE *, int);
736   
737   
738   
739   
740   # 1 "/usr/include/x86_64-linux-gnu/bits/stdio.h" 1 3 4
741   # 46 "/usr/include/x86_64-linux-gnu/bits/stdio.h" 3 4
742   extern __inline __attribute__ ((__gnu_inline__)) int
743   getchar (void)
744   {
745     return getc (stdin);
746   }
747   
748   
749   
750   
751   extern __inline __attribute__ ((__gnu_inline__)) int
752   fgetc_unlocked (FILE *__fp)
753   {
754     return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
755   }
756   
757   
758   
759   
760   
761   extern __inline __attribute__ ((__gnu_inline__)) int
762   getc_unlocked (FILE *__fp)
763   {
764     return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
765   }
766   
767   
768   extern __inline __attribute__ ((__gnu_inline__)) int
769   getchar_unlocked (void)
770   {
771     return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
772   }
773   
774   
775   
776   
777   extern __inline __attribute__ ((__gnu_inline__)) int
778   putchar (int __c)
779   {
780     return putc (__c, stdout);
781   }
782   
783   
784   
785   
786   extern __inline __attribute__ ((__gnu_inline__)) int
787   fputc_unlocked (int __c, FILE *__stream)
788   {
789     return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
790   }
791   
792   
793   
794   
795   
796   extern __inline __attribute__ ((__gnu_inline__)) int
797   putc_unlocked (int __c, FILE *__stream)
798   {
799     return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
800   }
801   
802   
803   extern __inline __attribute__ ((__gnu_inline__)) int
804   putchar_unlocked (int __c)
805   {
806     return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
807   }
808   # 127 "/usr/include/x86_64-linux-gnu/bits/stdio.h" 3 4
809   extern __inline __attribute__ ((__gnu_inline__)) int
810   __attribute__ ((__nothrow__ , __leaf__)) feof_unlocked (FILE *__stream)
811   {
812     return (((__stream)->_flags & 0x0010) != 0);
813   }
814   
815   
816   extern __inline __attribute__ ((__gnu_inline__)) int
817   __attribute__ ((__nothrow__ , __leaf__)) ferror_unlocked (FILE *__stream)
818   {
819     return (((__stream)->_flags & 0x0020) != 0);
820   }
821   # 892 "/usr/include/stdio.h" 2 3 4
822   
823   
824   # 1 "/usr/include/x86_64-linux-gnu/bits/stdio2.h" 1 3 4
825   # 26 "/usr/include/x86_64-linux-gnu/bits/stdio2.h" 3 4
826   extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
827        const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__))
828       __attribute__ ((__access__ (__write_only__, 1, 3)));
829   extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
830         const char *__restrict __format,
831         __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__))
832       __attribute__ ((__access__ (__write_only__, 1, 3)));
833   
834   
835   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
836   __attribute__ ((__nothrow__ , __leaf__)) sprintf (char *__restrict __s, const char *__restrict __fmt, ...)
837   {
838     return __builtin___sprintf_chk (__s, 2 - 1,
839         __builtin_object_size (__s, 2 > 1), __fmt,
840         __builtin_va_arg_pack ());
841   }
842   
843   
844   
845   
846   
847   
848   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
849   __attribute__ ((__nothrow__ , __leaf__)) vsprintf (char *__restrict __s, const char *__restrict __fmt, __gnuc_va_list __ap)
850   
851   {
852     return __builtin___vsprintf_chk (__s, 2 - 1,
853          __builtin_object_size (__s, 2 > 1), __fmt, __ap);
854   }
855   
856   
857   
858   extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
859         size_t __slen, const char *__restrict __format,
860         ...) __attribute__ ((__nothrow__ , __leaf__))
861       __attribute__ ((__access__ (__write_only__, 1, 2)));
862   extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
863          size_t __slen, const char *__restrict __format,
864          __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__));
865   
866   
867   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
868   __attribute__ ((__nothrow__ , __leaf__)) snprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, ...)
869   
870   {
871     return __builtin___snprintf_chk (__s, __n, 2 - 1,
872          __builtin_object_size (__s, 2 > 1), __fmt,
873          __builtin_va_arg_pack ());
874   }
875   
876   
877   
878   
879   
880   
881   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
882   __attribute__ ((__nothrow__ , __leaf__)) vsnprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, __gnuc_va_list __ap)
883   
884   {
885     return __builtin___vsnprintf_chk (__s, __n, 2 - 1,
886           __builtin_object_size (__s, 2 > 1), __fmt, __ap);
887   }
888   
889   
890   
891   
892   
893   extern int __fprintf_chk (FILE *__restrict __stream, int __flag,
894        const char *__restrict __format, ...);
895   extern int __printf_chk (int __flag, const char *__restrict __format, ...);
896   extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
897         const char *__restrict __format, __gnuc_va_list __ap);
898   extern int __vprintf_chk (int __flag, const char *__restrict __format,
899        __gnuc_va_list __ap);
900   
901   
902   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
903   fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
904   {
905     return __fprintf_chk (__stream, 2 - 1, __fmt,
906      __builtin_va_arg_pack ());
907   }
908   
909   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
910   printf (const char *__restrict __fmt, ...)
911   {
912     return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ());
913   }
914   
915   
916   
917   
918   
919   
920   
921   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
922   vprintf (const char *__restrict __fmt, __gnuc_va_list __ap)
923   {
924   
925     return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap);
926   
927   
928   
929   }
930   
931   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
932   vfprintf (FILE *__restrict __stream,
933      const char *__restrict __fmt, __gnuc_va_list __ap)
934   {
935     return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap);
936   }
937   
938   
939   extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt,
940        ...) __attribute__ ((__format__ (__printf__, 3, 4)));
941   extern int __vdprintf_chk (int __fd, int __flag,
942         const char *__restrict __fmt, __gnuc_va_list __arg)
943        __attribute__ ((__format__ (__printf__, 3, 0)));
944   
945   
946   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
947   dprintf (int __fd, const char *__restrict __fmt, ...)
948   {
949     return __dprintf_chk (__fd, 2 - 1, __fmt,
950      __builtin_va_arg_pack ());
951   }
952   
953   
954   
955   
956   
957   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
958   vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __ap)
959   {
960     return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap);
961   }
962   # 248 "/usr/include/x86_64-linux-gnu/bits/stdio2.h" 3 4
963   extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,
964        FILE *__restrict __stream)
965       __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 3)));
966   extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets")
967   
968   
969       __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
970   extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk")
971   
972   
973        __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer")))
974                                    ;
975   
976   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2))) char *
977   fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
978   {
979     size_t sz = __builtin_object_size (__s, 2 > 1);
980     if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && (((long unsigned int) (__n)) <= (sz) / (sizeof (char)))))
981       return __fgets_alias (__s, __n, __stream);
982     if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && !(((long unsigned int) (__n)) <= (sz) / (sizeof (char)))))
983       return __fgets_chk_warn (__s, sz, __n, __stream);
984     return __fgets_chk (__s, sz, __n, __stream);
985   }
986   
987   extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen,
988         size_t __size, size_t __n,
989         FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
990   extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread")
991   
992   
993               __attribute__ ((__warn_unused_result__));
994   extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk")
995   
996   
997   
998   
999        __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer")))
1000                                    ;
1001   
1002   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t
1003   fread (void *__restrict __ptr, size_t __size, size_t __n,
1004          FILE *__restrict __stream)
1005   {
1006     size_t sz = __builtin_object_size (__ptr, 0);
1007     if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (__size))) && (((long unsigned int) (__n)) <= (sz) / (__size))))
1008       return __fread_alias (__ptr, __size, __n, __stream);
1009     if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (__size))) && !(((long unsigned int) (__n)) <= (sz) / (__size))))
1010       return __fread_chk_warn (__ptr, sz, __size, __n, __stream);
1011     return __fread_chk (__ptr, sz, __size, __n, __stream);
1012   }
1013   # 327 "/usr/include/x86_64-linux-gnu/bits/stdio2.h" 3 4
1014   extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen,
1015           size_t __size, size_t __n,
1016           FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
1017   extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked")
1018   
1019   
1020                        __attribute__ ((__warn_unused_result__));
1021   extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk")
1022   
1023   
1024   
1025   
1026        __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer")))
1027                                           ;
1028   
1029   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t
1030   fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
1031     FILE *__restrict __stream)
1032   {
1033     size_t sz = __builtin_object_size (__ptr, 0);
1034     if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (__size))) && (((long unsigned int) (__n)) <= (sz) / (__size))))
1035       {
1036   
1037         if (__builtin_constant_p (__size)
1038      && __builtin_constant_p (__n)
1039      && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2))
1040      && __size * __n <= 8)
1041    {
1042      size_t __cnt = __size * __n;
1043      char *__cptr = (char *) __ptr;
1044      if (__cnt == 0)
1045        return 0;
1046   
1047      for (; __cnt > 0; --__cnt)
1048        {
1049          int __c = getc_unlocked (__stream);
1050          if (__c == (-1))
1051     break;
1052          *__cptr++ = __c;
1053        }
1054      return (__cptr - (char *) __ptr) / __size;
1055    }
1056   
1057         return __fread_unlocked_alias (__ptr, __size, __n, __stream);
1058       }
1059     if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (__size))) && !(((long unsigned int) (__n)) <= (sz) / (__size))))
1060       return __fread_unlocked_chk_warn (__ptr, sz, __size, __n, __stream);
1061     return __fread_unlocked_chk (__ptr, sz, __size, __n, __stream);
1062   
1063   }
1064   # 895 "/usr/include/stdio.h" 2 3 4
1065   
1066   
1067   
1068   
1069   
1070   
1071   
1072   
1073   # 13 "ssl/ssl_lib.c" 2
1074   # 1 "ssl/ssl_local.h" 1
1075   # 15 "ssl/ssl_local.h"
1076   # 1 "include/internal/e_os.h" 1
1077   # 13 "include/internal/e_os.h"
1078   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/limits.h" 1 3 4
1079   # 34 "/usr/lib/gcc/x86_64-linux-gnu/11/include/limits.h" 3 4
1080   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/syslimits.h" 1 3 4
1081   
1082   
1083   
1084   
1085   
1086   
1087   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/limits.h" 1 3 4
1088   # 203 "/usr/lib/gcc/x86_64-linux-gnu/11/include/limits.h" 3 4
1089   # 1 "/usr/include/limits.h" 1 3 4
1090   # 26 "/usr/include/limits.h" 3 4
1091   # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4
1092   # 27 "/usr/include/limits.h" 2 3 4
1093   # 195 "/usr/include/limits.h" 3 4
1094   # 1 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 1 3 4
1095   # 27 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 3 4
1096   # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
1097   # 28 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 2 3 4
1098   # 161 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 3 4
1099   # 1 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 1 3 4
1100   # 38 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 3 4
1101   # 1 "/usr/include/linux/limits.h" 1 3 4
1102   # 39 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 2 3 4
1103   # 81 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 3 4
1104   # 1 "/usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h" 1 3 4
1105   # 29 "/usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h" 3 4
1106   # 1 "/usr/include/x86_64-linux-gnu/bits/pthread_stack_min.h" 1 3 4
1107   # 30 "/usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h" 2 3 4
1108   # 82 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 2 3 4
1109   # 162 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 2 3 4
1110   # 196 "/usr/include/limits.h" 2 3 4
1111   
1112   
1113   
1114   # 1 "/usr/include/x86_64-linux-gnu/bits/posix2_lim.h" 1 3 4
1115   # 200 "/usr/include/limits.h" 2 3 4
1116   # 204 "/usr/lib/gcc/x86_64-linux-gnu/11/include/limits.h" 2 3 4
1117   # 8 "/usr/lib/gcc/x86_64-linux-gnu/11/include/syslimits.h" 2 3 4
1118   # 35 "/usr/lib/gcc/x86_64-linux-gnu/11/include/limits.h" 2 3 4
1119   # 14 "include/internal/e_os.h" 2
1120   # 1 "include/openssl/opensslconf.h" 1
1121   # 12 "include/openssl/opensslconf.h"
1122           
1123   
1124   # 1 "include/openssl/configuration.h" 1
1125   # 16 "include/openssl/configuration.h"
1126           
1127   # 15 "include/openssl/opensslconf.h" 2
1128   # 1 "include/openssl/macros.h" 1
1129   # 12 "include/openssl/macros.h"
1130           
1131   
1132   
1133   # 1 "include/openssl/opensslv.h" 1
1134   # 15 "include/openssl/opensslv.h"
1135           
1136   # 16 "include/openssl/macros.h" 2
1137   # 16 "include/openssl/opensslconf.h" 2
1138   # 15 "include/internal/e_os.h" 2
1139   
1140   # 1 "include/openssl/e_os2.h" 1
1141   # 12 "include/openssl/e_os2.h"
1142           
1143   # 234 "include/openssl/e_os2.h"
1144   # 1 "/usr/include/inttypes.h" 1 3 4
1145   # 27 "/usr/include/inttypes.h" 3 4
1146   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h" 1 3 4
1147   # 9 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h" 3 4
1148   # 1 "/usr/include/stdint.h" 1 3 4
1149   # 26 "/usr/include/stdint.h" 3 4
1150   # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4
1151   # 27 "/usr/include/stdint.h" 2 3 4
1152   
1153   # 1 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 1 3 4
1154   # 29 "/usr/include/stdint.h" 2 3 4
1155   # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
1156   # 30 "/usr/include/stdint.h" 2 3 4
1157   
1158   
1159   
1160   
1161   # 1 "/usr/include/x86_64-linux-gnu/bits/stdint-intn.h" 1 3 4
1162   # 24 "/usr/include/x86_64-linux-gnu/bits/stdint-intn.h" 3 4
1163   typedef __int8_t int8_t;
1164   typedef __int16_t int16_t;
1165   typedef __int32_t int32_t;
1166   typedef __int64_t int64_t;
1167   # 35 "/usr/include/stdint.h" 2 3 4
1168   
1169   
1170   # 1 "/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h" 1 3 4
1171   # 24 "/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h" 3 4
1172   typedef __uint8_t uint8_t;
1173   typedef __uint16_t uint16_t;
1174   typedef __uint32_t uint32_t;
1175   typedef __uint64_t uint64_t;
1176   # 38 "/usr/include/stdint.h" 2 3 4
1177   
1178   
1179   
1180   
1181   
1182   typedef __int_least8_t int_least8_t;
1183   typedef __int_least16_t int_least16_t;
1184   typedef __int_least32_t int_least32_t;
1185   typedef __int_least64_t int_least64_t;
1186   
1187   
1188   typedef __uint_least8_t uint_least8_t;
1189   typedef __uint_least16_t uint_least16_t;
1190   typedef __uint_least32_t uint_least32_t;
1191   typedef __uint_least64_t uint_least64_t;
1192   
1193   
1194   
1195   
1196   
1197   typedef signed char int_fast8_t;
1198   
1199   typedef long int int_fast16_t;
1200   typedef long int int_fast32_t;
1201   typedef long int int_fast64_t;
1202   # 71 "/usr/include/stdint.h" 3 4
1203   typedef unsigned char uint_fast8_t;
1204   
1205   typedef unsigned long int uint_fast16_t;
1206   typedef unsigned long int uint_fast32_t;
1207   typedef unsigned long int uint_fast64_t;
1208   # 87 "/usr/include/stdint.h" 3 4
1209   typedef long int intptr_t;
1210   
1211   
1212   typedef unsigned long int uintptr_t;
1213   # 101 "/usr/include/stdint.h" 3 4
1214   typedef __intmax_t intmax_t;
1215   typedef __uintmax_t uintmax_t;
1216   # 10 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h" 2 3 4
1217   # 28 "/usr/include/inttypes.h" 2 3 4
1218   
1219   
1220   
1221   
1222   
1223   
1224   typedef int __gwchar_t;
1225   # 266 "/usr/include/inttypes.h" 3 4
1226   
1227   
1228   
1229   
1230   
1231   typedef struct
1232     {
1233       long int quot;
1234       long int rem;
1235     } imaxdiv_t;
1236   # 290 "/usr/include/inttypes.h" 3 4
1237   extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1238   
1239   
1240   extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
1241         __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1242   
1243   
1244   extern intmax_t strtoimax (const char *__restrict __nptr,
1245         char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__));
1246   
1247   
1248   extern uintmax_t strtoumax (const char *__restrict __nptr,
1249          char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__));
1250   
1251   
1252   extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr,
1253         __gwchar_t **__restrict __endptr, int __base)
1254        __attribute__ ((__nothrow__ , __leaf__));
1255   
1256   
1257   extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr,
1258          __gwchar_t ** __restrict __endptr, int __base)
1259        __attribute__ ((__nothrow__ , __leaf__));
1260   
1261   
1262   # 235 "include/openssl/e_os2.h" 2
1263   # 260 "include/openssl/e_os2.h"
1264   
1265   # 260 "include/openssl/e_os2.h"
1266   typedef intmax_t ossl_intmax_t;
1267   typedef uintmax_t ossl_uintmax_t;
1268   # 17 "include/internal/e_os.h" 2
1269   # 1 "include/openssl/crypto.h" 1
1270   # 18 "include/openssl/crypto.h"
1271           
1272   
1273   
1274   
1275   
1276   
1277   
1278   # 1 "/usr/include/stdlib.h" 1 3 4
1279   # 26 "/usr/include/stdlib.h" 3 4
1280   # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4
1281   # 27 "/usr/include/stdlib.h" 2 3 4
1282   
1283   
1284   
1285   
1286   
1287   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 1 3 4
1288   # 321 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 3 4
1289   
1290   # 321 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 3 4
1291   typedef int wchar_t;
1292   # 33 "/usr/include/stdlib.h" 2 3 4
1293   
1294   
1295   
1296   
1297   
1298   
1299   
1300   # 1 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 1 3 4
1301   # 41 "/usr/include/stdlib.h" 2 3 4
1302   # 1 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 1 3 4
1303   # 42 "/usr/include/stdlib.h" 2 3 4
1304   # 59 "/usr/include/stdlib.h" 3 4
1305   typedef struct
1306     {
1307       int quot;
1308       int rem;
1309     } div_t;
1310   
1311   
1312   
1313   typedef struct
1314     {
1315       long int quot;
1316       long int rem;
1317     } ldiv_t;
1318   
1319   
1320   
1321   
1322   
1323   __extension__ typedef struct
1324     {
1325       long long int quot;
1326       long long int rem;
1327     } lldiv_t;
1328   # 98 "/usr/include/stdlib.h" 3 4
1329   extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1330   
1331   
1332   
1333   extern double atof (const char *__nptr)
1334        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1335   
1336   extern int atoi (const char *__nptr)
1337        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1338   
1339   extern long int atol (const char *__nptr)
1340        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1341   
1342   
1343   
1344   __extension__ extern long long int atoll (const char *__nptr)
1345        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1346   
1347   
1348   
1349   extern double strtod (const char *__restrict __nptr,
1350           char **__restrict __endptr)
1351        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1352   
1353   
1354   
1355   extern float strtof (const char *__restrict __nptr,
1356          char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1357   
1358   extern long double strtold (const char *__restrict __nptr,
1359          char **__restrict __endptr)
1360        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1361   # 177 "/usr/include/stdlib.h" 3 4
1362   extern long int strtol (const char *__restrict __nptr,
1363      char **__restrict __endptr, int __base)
1364        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1365   
1366   extern unsigned long int strtoul (const char *__restrict __nptr,
1367         char **__restrict __endptr, int __base)
1368        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1369   
1370   
1371   
1372   __extension__
1373   extern long long int strtoq (const char *__restrict __nptr,
1374           char **__restrict __endptr, int __base)
1375        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1376   
1377   __extension__
1378   extern unsigned long long int strtouq (const char *__restrict __nptr,
1379              char **__restrict __endptr, int __base)
1380        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1381   
1382   
1383   
1384   
1385   __extension__
1386   extern long long int strtoll (const char *__restrict __nptr,
1387            char **__restrict __endptr, int __base)
1388        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1389   
1390   __extension__
1391   extern unsigned long long int strtoull (const char *__restrict __nptr,
1392        char **__restrict __endptr, int __base)
1393        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1394   # 361 "/usr/include/stdlib.h" 3 4
1395   extern __inline __attribute__ ((__gnu_inline__)) int
1396   __attribute__ ((__nothrow__ , __leaf__)) atoi (const char *__nptr)
1397   {
1398     return (int) strtol (__nptr, (char **) ((void *)0), 10);
1399   }
1400   extern __inline __attribute__ ((__gnu_inline__)) long int
1401   __attribute__ ((__nothrow__ , __leaf__)) atol (const char *__nptr)
1402   {
1403     return strtol (__nptr, (char **) ((void *)0), 10);
1404   }
1405   
1406   
1407   __extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int
1408   __attribute__ ((__nothrow__ , __leaf__)) atoll (const char *__nptr)
1409   {
1410     return strtoll (__nptr, (char **) ((void *)0), 10);
1411   }
1412   # 386 "/usr/include/stdlib.h" 3 4
1413   extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1414   
1415   
1416   extern long int a64l (const char *__s)
1417        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1418   
1419   
1420   
1421   
1422   # 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4
1423   # 27 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
1424   
1425   
1426   
1427   
1428   
1429   
1430   typedef __u_char u_char;
1431   typedef __u_short u_short;
1432   typedef __u_int u_int;
1433   typedef __u_long u_long;
1434   typedef __quad_t quad_t;
1435   typedef __u_quad_t u_quad_t;
1436   typedef __fsid_t fsid_t;
1437   
1438   
1439   typedef __loff_t loff_t;
1440   
1441   
1442   
1443   
1444   typedef __ino_t ino_t;
1445   # 59 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
1446   typedef __dev_t dev_t;
1447   
1448   
1449   
1450   
1451   typedef __gid_t gid_t;
1452   
1453   
1454   
1455   
1456   typedef __mode_t mode_t;
1457   
1458   
1459   
1460   
1461   typedef __nlink_t nlink_t;
1462   
1463   
1464   
1465   
1466   typedef __uid_t uid_t;
1467   # 97 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
1468   typedef __pid_t pid_t;
1469   
1470   
1471   
1472   
1473   
1474   typedef __id_t id_t;
1475   # 114 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
1476   typedef __daddr_t daddr_t;
1477   typedef __caddr_t caddr_t;
1478   
1479   
1480   
1481   
1482   
1483   typedef __key_t key_t;
1484   
1485   
1486   
1487   
1488   # 1 "/usr/include/x86_64-linux-gnu/bits/types/clock_t.h" 1 3 4
1489   
1490   
1491   
1492   
1493   
1494   
1495   typedef __clock_t clock_t;
1496   # 127 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
1497   
1498   # 1 "/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h" 1 3 4
1499   
1500   
1501   
1502   
1503   
1504   
1505   typedef __clockid_t clockid_t;
1506   # 129 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
1507   # 1 "/usr/include/x86_64-linux-gnu/bits/types/time_t.h" 1 3 4
1508   # 10 "/usr/include/x86_64-linux-gnu/bits/types/time_t.h" 3 4
1509   typedef __time_t time_t;
1510   # 130 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
1511   # 1 "/usr/include/x86_64-linux-gnu/bits/types/timer_t.h" 1 3 4
1512   
1513   
1514   
1515   
1516   
1517   
1518   typedef __timer_t timer_t;
1519   # 131 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
1520   # 144 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
1521   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 1 3 4
1522   # 145 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
1523   
1524   
1525   
1526   typedef unsigned long int ulong;
1527   typedef unsigned short int ushort;
1528   typedef unsigned int uint;
1529   
1530   
1531   
1532   
1533   
1534   
1535   
1536   typedef __uint8_t u_int8_t;
1537   typedef __uint16_t u_int16_t;
1538   typedef __uint32_t u_int32_t;
1539   typedef __uint64_t u_int64_t;
1540   
1541   
1542   typedef int register_t __attribute__ ((__mode__ (__word__)));
1543   # 176 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
1544   # 1 "/usr/include/endian.h" 1 3 4
1545   # 24 "/usr/include/endian.h" 3 4
1546   # 1 "/usr/include/x86_64-linux-gnu/bits/endian.h" 1 3 4
1547   # 35 "/usr/include/x86_64-linux-gnu/bits/endian.h" 3 4
1548   # 1 "/usr/include/x86_64-linux-gnu/bits/endianness.h" 1 3 4
1549   # 36 "/usr/include/x86_64-linux-gnu/bits/endian.h" 2 3 4
1550   # 25 "/usr/include/endian.h" 2 3 4
1551   # 35 "/usr/include/endian.h" 3 4
1552   # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4
1553   # 33 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4
1554   static __inline __uint16_t
1555   __bswap_16 (__uint16_t __bsx)
1556   {
1557   
1558     return __builtin_bswap16 (__bsx);
1559   
1560   
1561   
1562   }
1563   
1564   
1565   
1566   
1567   
1568   
1569   static __inline __uint32_t
1570   __bswap_32 (__uint32_t __bsx)
1571   {
1572   
1573     return __builtin_bswap32 (__bsx);
1574   
1575   
1576   
1577   }
1578   # 69 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4
1579   __extension__ static __inline __uint64_t
1580   __bswap_64 (__uint64_t __bsx)
1581   {
1582   
1583     return __builtin_bswap64 (__bsx);
1584   
1585   
1586   
1587   }
1588   # 36 "/usr/include/endian.h" 2 3 4
1589   # 1 "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" 1 3 4
1590   # 32 "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" 3 4
1591   static __inline __uint16_t
1592   __uint16_identity (__uint16_t __x)
1593   {
1594     return __x;
1595   }
1596   
1597   static __inline __uint32_t
1598   __uint32_identity (__uint32_t __x)
1599   {
1600     return __x;
1601   }
1602   
1603   static __inline __uint64_t
1604   __uint64_identity (__uint64_t __x)
1605   {
1606     return __x;
1607   }
1608   # 37 "/usr/include/endian.h" 2 3 4
1609   # 177 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
1610   
1611   
1612   # 1 "/usr/include/x86_64-linux-gnu/sys/select.h" 1 3 4
1613   # 30 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
1614   # 1 "/usr/include/x86_64-linux-gnu/bits/select.h" 1 3 4
1615   # 31 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4
1616   
1617   
1618   # 1 "/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h" 1 3 4
1619   
1620   
1621   
1622   # 1 "/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h" 1 3 4
1623   
1624   
1625   
1626   
1627   typedef struct
1628   {
1629     unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
1630   } __sigset_t;
1631   # 5 "/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h" 2 3 4
1632   
1633   
1634   typedef __sigset_t sigset_t;
1635   # 34 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4
1636   
1637   
1638   
1639   # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h" 1 3 4
1640   
1641   
1642   
1643   
1644   
1645   
1646   
1647   struct timeval
1648   {
1649   
1650   
1651   
1652   
1653     __time_t tv_sec;
1654     __suseconds_t tv_usec;
1655   
1656   };
1657   # 38 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4
1658   
1659   # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 1 3 4
1660   # 11 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 3 4
1661   struct timespec
1662   {
1663   
1664   
1665   
1666     __time_t tv_sec;
1667   
1668   
1669   
1670   
1671     __syscall_slong_t tv_nsec;
1672   # 31 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 3 4
1673   };
1674   # 40 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4
1675   
1676   
1677   
1678   typedef __suseconds_t suseconds_t;
1679   
1680   
1681   
1682   
1683   
1684   typedef long int __fd_mask;
1685   # 59 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
1686   typedef struct
1687     {
1688   
1689   
1690   
1691   
1692   
1693   
1694       __fd_mask __fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
1695   
1696   
1697     } fd_set;
1698   
1699   
1700   
1701   
1702   
1703   
1704   typedef __fd_mask fd_mask;
1705   # 91 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
1706   
1707   # 102 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
1708   extern int select (int __nfds, fd_set *__restrict __readfds,
1709        fd_set *__restrict __writefds,
1710        fd_set *__restrict __exceptfds,
1711        struct timeval *__restrict __timeout);
1712   # 127 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
1713   extern int pselect (int __nfds, fd_set *__restrict __readfds,
1714         fd_set *__restrict __writefds,
1715         fd_set *__restrict __exceptfds,
1716         const struct timespec *__restrict __timeout,
1717         const __sigset_t *__restrict __sigmask);
1718   # 150 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4
1719   # 1 "/usr/include/x86_64-linux-gnu/bits/select2.h" 1 3 4
1720   # 24 "/usr/include/x86_64-linux-gnu/bits/select2.h" 3 4
1721   extern long int __fdelt_chk (long int __d);
1722   extern long int __fdelt_warn (long int __d)
1723     __attribute__((__warning__ ("bit outside of fd_set selected")));
1724   # 151 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4
1725   
1726   
1727   
1728   # 180 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
1729   
1730   
1731   
1732   
1733   
1734   typedef __blksize_t blksize_t;
1735   
1736   
1737   
1738   
1739   
1740   
1741   typedef __blkcnt_t blkcnt_t;
1742   
1743   
1744   
1745   typedef __fsblkcnt_t fsblkcnt_t;
1746   
1747   
1748   
1749   typedef __fsfilcnt_t fsfilcnt_t;
1750   # 227 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4
1751   # 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 1 3 4
1752   # 23 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4
1753   # 1 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 1 3 4
1754   # 44 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 3 4
1755   # 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 1 3 4
1756   # 21 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 3 4
1757   # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
1758   # 22 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 2 3 4
1759   # 45 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 2 3 4
1760   
1761   # 1 "/usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h" 1 3 4
1762   # 25 "/usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h" 3 4
1763   typedef union
1764   {
1765     __extension__ unsigned long long int __value64;
1766     struct
1767     {
1768       unsigned int __low;
1769       unsigned int __high;
1770     } __value32;
1771   } __atomic_wide_counter;
1772   # 47 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 2 3 4
1773   
1774   
1775   
1776   
1777   typedef struct __pthread_internal_list
1778   {
1779     struct __pthread_internal_list *__prev;
1780     struct __pthread_internal_list *__next;
1781   } __pthread_list_t;
1782   
1783   typedef struct __pthread_internal_slist
1784   {
1785     struct __pthread_internal_slist *__next;
1786   } __pthread_slist_t;
1787   # 76 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 3 4
1788   # 1 "/usr/include/x86_64-linux-gnu/bits/struct_mutex.h" 1 3 4
1789   # 22 "/usr/include/x86_64-linux-gnu/bits/struct_mutex.h" 3 4
1790   struct __pthread_mutex_s
1791   {
1792     int __lock;
1793     unsigned int __count;
1794     int __owner;
1795   
1796     unsigned int __nusers;
1797   
1798   
1799   
1800     int __kind;
1801   
1802     short __spins;
1803     short __elision;
1804     __pthread_list_t __list;
1805   # 53 "/usr/include/x86_64-linux-gnu/bits/struct_mutex.h" 3 4
1806   };
1807   # 77 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 2 3 4
1808   # 89 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 3 4
1809   # 1 "/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h" 1 3 4
1810   # 23 "/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h" 3 4
1811   struct __pthread_rwlock_arch_t
1812   {
1813     unsigned int __readers;
1814     unsigned int __writers;
1815     unsigned int __wrphase_futex;
1816     unsigned int __writers_futex;
1817     unsigned int __pad3;
1818     unsigned int __pad4;
1819   
1820     int __cur_writer;
1821     int __shared;
1822     signed char __rwelision;
1823   
1824   
1825   
1826   
1827     unsigned char __pad1[7];
1828   
1829   
1830     unsigned long int __pad2;
1831   
1832   
1833     unsigned int __flags;
1834   # 55 "/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h" 3 4
1835   };
1836   # 90 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 2 3 4
1837   
1838   
1839   
1840   
1841   struct __pthread_cond_s
1842   {
1843     __atomic_wide_counter __wseq;
1844     __atomic_wide_counter __g1_start;
1845     unsigned int __g_refs[2] ;
1846     unsigned int __g_size[2];
1847     unsigned int __g1_orig_size;
1848     unsigned int __wrefs;
1849     unsigned int __g_signals[2];
1850   };
1851   
1852   typedef unsigned int __tss_t;
1853   typedef unsigned long int __thrd_t;
1854   
1855   typedef struct
1856   {
1857     int __data ;
1858   } __once_flag;
1859   # 24 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 2 3 4
1860   
1861   
1862   
1863   typedef unsigned long int pthread_t;
1864   
1865   
1866   
1867   
1868   typedef union
1869   {
1870     char __size[4];
1871     int __align;
1872   } pthread_mutexattr_t;
1873   
1874   
1875   
1876   
1877   typedef union
1878   {
1879     char __size[4];
1880     int __align;
1881   } pthread_condattr_t;
1882   
1883   
1884   
1885   typedef unsigned int pthread_key_t;
1886   
1887   
1888   
1889   typedef int pthread_once_t;
1890   
1891   
1892   union pthread_attr_t
1893   {
1894     char __size[56];
1895     long int __align;
1896   };
1897   
1898   typedef union pthread_attr_t pthread_attr_t;
1899   
1900   
1901   
1902   
1903   typedef union
1904   {
1905     struct __pthread_mutex_s __data;
1906     char __size[40];
1907     long int __align;
1908   } pthread_mutex_t;
1909   
1910   
1911   typedef union
1912   {
1913     struct __pthread_cond_s __data;
1914     char __size[48];
1915     __extension__ long long int __align;
1916   } pthread_cond_t;
1917   
1918   
1919   
1920   
1921   
1922   typedef union
1923   {
1924     struct __pthread_rwlock_arch_t __data;
1925     char __size[56];
1926     long int __align;
1927   } pthread_rwlock_t;
1928   
1929   typedef union
1930   {
1931     char __size[8];
1932     long int __align;
1933   } pthread_rwlockattr_t;
1934   
1935   
1936   
1937   
1938   
1939   typedef volatile int pthread_spinlock_t;
1940   
1941   
1942   
1943   
1944   typedef union
1945   {
1946     char __size[32];
1947     long int __align;
1948   } pthread_barrier_t;
1949   
1950   typedef union
1951   {
1952     char __size[4];
1953     int __align;
1954   } pthread_barrierattr_t;
1955   # 228 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4
1956   
1957   
1958   
1959   # 396 "/usr/include/stdlib.h" 2 3 4
1960   
1961   
1962   
1963   
1964   
1965   
1966   extern long int random (void) __attribute__ ((__nothrow__ , __leaf__));
1967   
1968   
1969   extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
1970   
1971   
1972   
1973   
1974   
1975   extern char *initstate (unsigned int __seed, char *__statebuf,
1976      size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1977   
1978   
1979   
1980   extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1981   
1982   
1983   
1984   
1985   
1986   
1987   
1988   struct random_data
1989     {
1990       int32_t *fptr;
1991       int32_t *rptr;
1992       int32_t *state;
1993       int rand_type;
1994       int rand_deg;
1995       int rand_sep;
1996       int32_t *end_ptr;
1997     };
1998   
1999   extern int random_r (struct random_data *__restrict __buf,
2000          int32_t *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2001   
2002   extern int srandom_r (unsigned int __seed, struct random_data *__buf)
2003        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2004   
2005   extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
2006      size_t __statelen,
2007      struct random_data *__restrict __buf)
2008        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
2009   
2010   extern int setstate_r (char *__restrict __statebuf,
2011            struct random_data *__restrict __buf)
2012        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2013   
2014   
2015   
2016   
2017   
2018   extern int rand (void) __attribute__ ((__nothrow__ , __leaf__));
2019   
2020   extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
2021   
2022   
2023   
2024   extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__));
2025   
2026   
2027   
2028   
2029   
2030   
2031   
2032   extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__));
2033   extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2034   
2035   
2036   extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
2037   extern long int nrand48 (unsigned short int __xsubi[3])
2038        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2039   
2040   
2041   extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
2042   extern long int jrand48 (unsigned short int __xsubi[3])
2043        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2044   
2045   
2046   extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__));
2047   extern unsigned short int *seed48 (unsigned short int __seed16v[3])
2048        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2049   extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2050   
2051   
2052   
2053   
2054   
2055   struct drand48_data
2056     {
2057       unsigned short int __x[3];
2058       unsigned short int __old_x[3];
2059       unsigned short int __c;
2060       unsigned short int __init;
2061       __extension__ unsigned long long int __a;
2062   
2063     };
2064   
2065   
2066   extern int drand48_r (struct drand48_data *__restrict __buffer,
2067           double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2068   extern int erand48_r (unsigned short int __xsubi[3],
2069           struct drand48_data *__restrict __buffer,
2070           double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2071   
2072   
2073   extern int lrand48_r (struct drand48_data *__restrict __buffer,
2074           long int *__restrict __result)
2075        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2076   extern int nrand48_r (unsigned short int __xsubi[3],
2077           struct drand48_data *__restrict __buffer,
2078           long int *__restrict __result)
2079        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2080   
2081   
2082   extern int mrand48_r (struct drand48_data *__restrict __buffer,
2083           long int *__restrict __result)
2084        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2085   extern int jrand48_r (unsigned short int __xsubi[3],
2086           struct drand48_data *__restrict __buffer,
2087           long int *__restrict __result)
2088        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2089   
2090   
2091   extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
2092        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2093   
2094   extern int seed48_r (unsigned short int __seed16v[3],
2095          struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2096   
2097   extern int lcong48_r (unsigned short int __param[7],
2098           struct drand48_data *__buffer)
2099        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2100   
2101   
2102   
2103   
2104   extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__))
2105        __attribute__ ((__alloc_size__ (1))) __attribute__ ((__warn_unused_result__));
2106   
2107   extern void *calloc (size_t __nmemb, size_t __size)
2108        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (1, 2))) __attribute__ ((__warn_unused_result__));
2109   
2110   
2111   
2112   
2113   
2114   
2115   extern void *realloc (void *__ptr, size_t __size)
2116        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__alloc_size__ (2)));
2117   
2118   
2119   extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
2120   
2121   
2122   
2123   
2124   
2125   
2126   
2127   extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
2128        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__))
2129        __attribute__ ((__alloc_size__ (2, 3)))
2130       __attribute__ ((__malloc__ (__builtin_free, 1)));
2131   
2132   
2133   extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
2134        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__ (reallocarray, 1)));
2135   
2136   
2137   
2138   # 1 "/usr/include/alloca.h" 1 3 4
2139   # 24 "/usr/include/alloca.h" 3 4
2140   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 1 3 4
2141   # 25 "/usr/include/alloca.h" 2 3 4
2142   
2143   
2144   
2145   
2146   
2147   
2148   
2149   extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__));
2150   
2151   
2152   
2153   
2154   
2155   
2156   # 575 "/usr/include/stdlib.h" 2 3 4
2157   
2158   
2159   
2160   
2161   
2162   extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__))
2163        __attribute__ ((__alloc_size__ (1))) __attribute__ ((__warn_unused_result__));
2164   
2165   
2166   
2167   
2168   extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
2169        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2170   
2171   
2172   
2173   
2174   extern void *aligned_alloc (size_t __alignment, size_t __size)
2175        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_align__ (1)))
2176        __attribute__ ((__alloc_size__ (2))) __attribute__ ((__warn_unused_result__));
2177   
2178   
2179   
2180   extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
2181   
2182   
2183   
2184   extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2185   
2186   
2187   
2188   
2189   
2190   
2191   
2192   extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2193   
2194   
2195   
2196   
2197   
2198   
2199   extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
2200        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2201   
2202   
2203   
2204   
2205   
2206   extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
2207   
2208   
2209   
2210   
2211   
2212   extern void quick_exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
2213   
2214   
2215   
2216   
2217   
2218   extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
2219   
2220   
2221   
2222   
2223   extern char *getenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2224   # 654 "/usr/include/stdlib.h" 3 4
2225   extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2226   
2227   
2228   
2229   
2230   
2231   extern int setenv (const char *__name, const char *__value, int __replace)
2232        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2233   
2234   
2235   extern int unsetenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2236   
2237   
2238   
2239   
2240   
2241   
2242   extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__));
2243   # 682 "/usr/include/stdlib.h" 3 4
2244   extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2245   # 695 "/usr/include/stdlib.h" 3 4
2246   extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2247   # 717 "/usr/include/stdlib.h" 3 4
2248   extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2249   # 738 "/usr/include/stdlib.h" 3 4
2250   extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2251   # 791 "/usr/include/stdlib.h" 3 4
2252   extern int system (const char *__command) __attribute__ ((__warn_unused_result__));
2253   # 808 "/usr/include/stdlib.h" 3 4
2254   extern char *realpath (const char *__restrict __name,
2255            char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2256   
2257   
2258   
2259   
2260   
2261   
2262   typedef int (*__compar_fn_t) (const void *, const void *);
2263   # 828 "/usr/include/stdlib.h" 3 4
2264   extern void *bsearch (const void *__key, const void *__base,
2265           size_t __nmemb, size_t __size, __compar_fn_t __compar)
2266        __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__));
2267   
2268   
2269   # 1 "/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h" 1 3 4
2270   # 19 "/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h" 3 4
2271   extern __inline __attribute__ ((__gnu_inline__)) void *
2272   bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
2273     __compar_fn_t __compar)
2274   {
2275     size_t __l, __u, __idx;
2276     const void *__p;
2277     int __comparison;
2278   
2279     __l = 0;
2280     __u = __nmemb;
2281     while (__l < __u)
2282       {
2283         __idx = (__l + __u) / 2;
2284         __p = (const void *) (((const char *) __base) + (__idx * __size));
2285         __comparison = (*__compar) (__key, __p);
2286         if (__comparison < 0)
2287    __u = __idx;
2288         else if (__comparison > 0)
2289    __l = __idx + 1;
2290         else
2291    {
2292   
2293   #pragma GCC diagnostic push
2294   #pragma GCC diagnostic ignored "-Wcast-qual"
2295   
2296      return (void *) __p;
2297   
2298   #pragma GCC diagnostic pop
2299   
2300    }
2301       }
2302   
2303     return ((void *)0);
2304   }
2305   # 834 "/usr/include/stdlib.h" 2 3 4
2306   
2307   
2308   
2309   
2310   extern void qsort (void *__base, size_t __nmemb, size_t __size,
2311        __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
2312   # 848 "/usr/include/stdlib.h" 3 4
2313   extern int abs (int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
2314   extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
2315   
2316   
2317   __extension__ extern long long int llabs (long long int __x)
2318        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
2319   
2320   
2321   
2322   
2323   
2324   
2325   extern div_t div (int __numer, int __denom)
2326        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
2327   extern ldiv_t ldiv (long int __numer, long int __denom)
2328        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
2329   
2330   
2331   __extension__ extern lldiv_t lldiv (long long int __numer,
2332           long long int __denom)
2333        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
2334   # 880 "/usr/include/stdlib.h" 3 4
2335   extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
2336        int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
2337   
2338   
2339   
2340   
2341   extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
2342        int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
2343   
2344   
2345   
2346   
2347   extern char *gcvt (double __value, int __ndigit, char *__buf)
2348        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
2349   
2350   
2351   
2352   
2353   extern char *qecvt (long double __value, int __ndigit,
2354         int *__restrict __decpt, int *__restrict __sign)
2355        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
2356   extern char *qfcvt (long double __value, int __ndigit,
2357         int *__restrict __decpt, int *__restrict __sign)
2358        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
2359   extern char *qgcvt (long double __value, int __ndigit, char *__buf)
2360        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
2361   
2362   
2363   
2364   
2365   extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
2366        int *__restrict __sign, char *__restrict __buf,
2367        size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
2368   extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
2369        int *__restrict __sign, char *__restrict __buf,
2370        size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
2371   
2372   extern int qecvt_r (long double __value, int __ndigit,
2373         int *__restrict __decpt, int *__restrict __sign,
2374         char *__restrict __buf, size_t __len)
2375        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
2376   extern int qfcvt_r (long double __value, int __ndigit,
2377         int *__restrict __decpt, int *__restrict __sign,
2378         char *__restrict __buf, size_t __len)
2379        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
2380   
2381   
2382   
2383   
2384   
2385   extern int mblen (const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
2386   
2387   
2388   extern int mbtowc (wchar_t *__restrict __pwc,
2389        const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
2390   
2391   
2392   extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__));
2393   
2394   
2395   
2396   extern size_t mbstowcs (wchar_t *__restrict __pwcs,
2397      const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__))
2398       __attribute__ ((__access__ (__read_only__, 2)));
2399   
2400   extern size_t wcstombs (char *__restrict __s,
2401      const wchar_t *__restrict __pwcs, size_t __n)
2402        __attribute__ ((__nothrow__ , __leaf__))
2403     __attribute__ ((__access__ (__write_only__, 1, 3)))
2404     __attribute__ ((__access__ (__read_only__, 2)));
2405   
2406   
2407   
2408   
2409   
2410   
2411   extern int rpmatch (const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2412   # 967 "/usr/include/stdlib.h" 3 4
2413   extern int getsubopt (char **__restrict __optionp,
2414           char *const *__restrict __tokens,
2415           char **__restrict __valuep)
2416        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__));
2417   # 1013 "/usr/include/stdlib.h" 3 4
2418   extern int getloadavg (double __loadavg[], int __nelem)
2419        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2420   # 1023 "/usr/include/stdlib.h" 3 4
2421   # 1 "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h" 1 3 4
2422   # 24 "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h" 3 4
2423   extern __inline __attribute__ ((__gnu_inline__)) double
2424   __attribute__ ((__nothrow__ , __leaf__)) atof (const char *__nptr)
2425   {
2426     return strtod (__nptr, (char **) ((void *)0));
2427   }
2428   # 1024 "/usr/include/stdlib.h" 2 3 4
2429   
2430   
2431   
2432   # 1 "/usr/include/x86_64-linux-gnu/bits/stdlib.h" 1 3 4
2433   # 23 "/usr/include/x86_64-linux-gnu/bits/stdlib.h" 3 4
2434   extern char *__realpath_chk (const char *__restrict __name,
2435           char *__restrict __resolved,
2436           size_t __resolvedlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2437   extern char *__realpath_alias (const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__ , __leaf__))
2438   
2439                                                    __attribute__ ((__warn_unused_result__));
2440   extern char *__realpath_chk_warn (const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__ , __leaf__))
2441   
2442   
2443                                                   __attribute__ ((__warn_unused_result__))
2444        __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer")))
2445                                         ;
2446   
2447   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
2448   __attribute__ ((__nothrow__ , __leaf__)) realpath (const char *__restrict __name, char *__restrict __resolved)
2449   {
2450     size_t sz = __builtin_object_size (__resolved, 2 > 1);
2451   
2452     if (sz == (size_t) -1)
2453       return __realpath_alias (__name, __resolved);
2454   
2455   
2456     if ((((__typeof (4096)) 0 < (__typeof (4096)) -1 || (__builtin_constant_p (4096) && (4096) > 0)) && __builtin_constant_p ((((long unsigned int) (4096)) <= (sz) / (sizeof (char)))) && !(((long unsigned int) (4096)) <= (sz) / (sizeof (char)))))
2457       return __realpath_chk_warn (__name, __resolved, sz);
2458   
2459     return __realpath_chk (__name, __resolved, sz);
2460   }
2461   
2462   
2463   extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen,
2464          size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)))
2465       __attribute__ ((__access__ (__write_only__, 2, 3)));
2466   extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__ , __leaf__))
2467   
2468        __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 2, 3)));
2469   extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__ , __leaf__))
2470   
2471   
2472        __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf")))
2473                      ;
2474   
2475   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2476   __attribute__ ((__nothrow__ , __leaf__)) ptsname_r (int __fd, char *__buf, size_t __buflen)
2477   {
2478     return ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __ptsname_r_alias (__fd, __buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)) : __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1))))
2479   
2480                              ;
2481   }
2482   
2483   
2484   extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen)
2485     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2486   extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__ , __leaf__))
2487                 __attribute__ ((__warn_unused_result__));
2488   
2489   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) int
2490   __attribute__ ((__nothrow__ , __leaf__)) wctomb (char *__s, wchar_t __wchar)
2491   {
2492   
2493   
2494   
2495   
2496   
2497   
2498   
2499     if (__builtin_object_size (__s, 2 > 1) != (size_t) -1
2500         && 16 > __builtin_object_size (__s, 2 > 1))
2501       return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1));
2502     return __wctomb_alias (__s, __wchar);
2503   }
2504   
2505   
2506   extern size_t __mbstowcs_chk (wchar_t *__restrict __dst,
2507            const char *__restrict __src,
2508            size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__))
2509       __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
2510   extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__ , __leaf__))
2511   
2512   
2513   
2514       __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
2515   extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__ , __leaf__))
2516   
2517   
2518   
2519        __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)")))
2520                           ;
2521   
2522   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
2523   __attribute__ ((__nothrow__ , __leaf__)) mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len)
2524   
2525   {
2526     return ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))) && (((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))) ? __mbstowcs_alias (__dst, __src, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))) ? __mbstowcs_chk_warn (__dst, __src, __len, (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t))) : __mbstowcs_chk (__dst, __src, __len, (__builtin_object_size (__dst, 2 > 1)) / (sizeof (wchar_t)))))
2527   
2528                              ;
2529   }
2530   
2531   
2532   extern size_t __wcstombs_chk (char *__restrict __dst,
2533            const wchar_t *__restrict __src,
2534            size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__))
2535     __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
2536   extern size_t __wcstombs_alias (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__ , __leaf__))
2537   
2538   
2539   
2540     __attribute__ ((__access__ (__write_only__, 1, 3))) __attribute__ ((__access__ (__read_only__, 2)));
2541   extern size_t __wcstombs_chk_warn (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__ , __leaf__))
2542   
2543   
2544   
2545        __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len")));
2546   
2547   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
2548   __attribute__ ((__nothrow__ , __leaf__)) wcstombs (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len)
2549   
2550   {
2551     return ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (char)))) ? __wcstombs_alias (__dst, __src, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__dst, 2 > 1)) / (sizeof (char)))) ? __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)) : __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1))))
2552   
2553                            ;
2554   }
2555   # 1028 "/usr/include/stdlib.h" 2 3 4
2556   
2557   
2558   
2559   
2560   
2561   
2562   
2563   
2564   # 26 "include/openssl/crypto.h" 2
2565   # 1 "/usr/include/time.h" 1 3 4
2566   # 29 "/usr/include/time.h" 3 4
2567   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 1 3 4
2568   # 30 "/usr/include/time.h" 2 3 4
2569   
2570   
2571   
2572   # 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4
2573   # 34 "/usr/include/time.h" 2 3 4
2574   
2575   
2576   
2577   
2578   
2579   # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h" 1 3 4
2580   
2581   
2582   
2583   
2584   
2585   
2586   struct tm
2587   {
2588     int tm_sec;
2589     int tm_min;
2590     int tm_hour;
2591     int tm_mday;
2592     int tm_mon;
2593     int tm_year;
2594     int tm_wday;
2595     int tm_yday;
2596     int tm_isdst;
2597   
2598   
2599     long int tm_gmtoff;
2600     const char *tm_zone;
2601   
2602   
2603   
2604   
2605   };
2606   # 40 "/usr/include/time.h" 2 3 4
2607   # 48 "/usr/include/time.h" 3 4
2608   # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h" 1 3 4
2609   
2610   
2611   
2612   
2613   
2614   
2615   
2616   struct itimerspec
2617     {
2618       struct timespec it_interval;
2619       struct timespec it_value;
2620     };
2621   # 49 "/usr/include/time.h" 2 3 4
2622   struct sigevent;
2623   # 60 "/usr/include/time.h" 3 4
2624   # 1 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 1 3 4
2625   # 22 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 3 4
2626   # 1 "/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h" 1 3 4
2627   # 27 "/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h" 3 4
2628   struct __locale_struct
2629   {
2630   
2631     struct __locale_data *__locales[13];
2632   
2633   
2634     const unsigned short int *__ctype_b;
2635     const int *__ctype_tolower;
2636     const int *__ctype_toupper;
2637   
2638   
2639     const char *__names[13];
2640   };
2641   
2642   typedef struct __locale_struct *__locale_t;
2643   # 23 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 2 3 4
2644   
2645   typedef __locale_t locale_t;
2646   # 61 "/usr/include/time.h" 2 3 4
2647   
2648   
2649   
2650   
2651   
2652   
2653   
2654   
2655   
2656   
2657   
2658   extern clock_t clock (void) __attribute__ ((__nothrow__ , __leaf__));
2659   
2660   
2661   
2662   extern time_t time (time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
2663   
2664   
2665   extern double difftime (time_t __time1, time_t __time0)
2666        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2667   
2668   
2669   extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
2670   # 100 "/usr/include/time.h" 3 4
2671   extern size_t strftime (char *__restrict __s, size_t __maxsize,
2672      const char *__restrict __format,
2673      const struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
2674   # 116 "/usr/include/time.h" 3 4
2675   extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
2676        const char *__restrict __format,
2677        const struct tm *__restrict __tp,
2678        locale_t __loc) __attribute__ ((__nothrow__ , __leaf__));
2679   # 132 "/usr/include/time.h" 3 4
2680   extern struct tm *gmtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
2681   
2682   
2683   
2684   extern struct tm *localtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
2685   # 154 "/usr/include/time.h" 3 4
2686   extern struct tm *gmtime_r (const time_t *__restrict __timer,
2687          struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
2688   
2689   
2690   
2691   extern struct tm *localtime_r (const time_t *__restrict __timer,
2692             struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
2693   # 179 "/usr/include/time.h" 3 4
2694   extern char *asctime (const struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
2695   
2696   
2697   
2698   extern char *ctime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
2699   # 197 "/usr/include/time.h" 3 4
2700   extern char *asctime_r (const struct tm *__restrict __tp,
2701      char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
2702   
2703   
2704   
2705   extern char *ctime_r (const time_t *__restrict __timer,
2706           char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
2707   # 217 "/usr/include/time.h" 3 4
2708   extern char *__tzname[2];
2709   extern int __daylight;
2710   extern long int __timezone;
2711   
2712   
2713   
2714   
2715   extern char *tzname[2];
2716   
2717   
2718   
2719   extern void tzset (void) __attribute__ ((__nothrow__ , __leaf__));
2720   
2721   
2722   
2723   extern int daylight;
2724   extern long int timezone;
2725   # 249 "/usr/include/time.h" 3 4
2726   extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
2727   
2728   extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
2729   # 262 "/usr/include/time.h" 3 4
2730   extern int dysize (int __year) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2731   # 272 "/usr/include/time.h" 3 4
2732   extern int nanosleep (const struct timespec *__requested_time,
2733           struct timespec *__remaining);
2734   
2735   
2736   extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__ , __leaf__));
2737   
2738   
2739   extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__ , __leaf__));
2740   
2741   
2742   extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
2743        __attribute__ ((__nothrow__ , __leaf__));
2744   # 311 "/usr/include/time.h" 3 4
2745   extern int clock_nanosleep (clockid_t __clock_id, int __flags,
2746          const struct timespec *__req,
2747          struct timespec *__rem);
2748   # 326 "/usr/include/time.h" 3 4
2749   extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__ , __leaf__));
2750   
2751   
2752   
2753   
2754   extern int timer_create (clockid_t __clock_id,
2755       struct sigevent *__restrict __evp,
2756       timer_t *__restrict __timerid) __attribute__ ((__nothrow__ , __leaf__));
2757   
2758   
2759   extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
2760   
2761   
2762   
2763   extern int timer_settime (timer_t __timerid, int __flags,
2764        const struct itimerspec *__restrict __value,
2765        struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__ , __leaf__));
2766   
2767   
2768   extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
2769        __attribute__ ((__nothrow__ , __leaf__));
2770   # 364 "/usr/include/time.h" 3 4
2771   extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
2772   
2773   
2774   
2775   
2776   
2777   
2778   extern int timespec_get (struct timespec *__ts, int __base)
2779        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2780   # 440 "/usr/include/time.h" 3 4
2781   
2782   # 27 "include/openssl/crypto.h" 2
2783   
2784   
2785   
2786   
2787   
2788   
2789   
2790   # 1 "include/openssl/safestack.h" 1
2791   # 17 "include/openssl/safestack.h"
2792           
2793   
2794   
2795   
2796   
2797   
2798   
2799   # 1 "include/openssl/stack.h" 1
2800   # 12 "include/openssl/stack.h"
2801           
2802   # 23 "include/openssl/stack.h"
2803   
2804   # 23 "include/openssl/stack.h"
2805   typedef struct stack_st OPENSSL_STACK;
2806   
2807   typedef int (*OPENSSL_sk_compfunc)(const void *, const void *);
2808   typedef void (*OPENSSL_sk_freefunc)(void *);
2809   typedef void *(*OPENSSL_sk_copyfunc)(const void *);
2810   
2811   int OPENSSL_sk_num(const OPENSSL_STACK *);
2812   void *OPENSSL_sk_value(const OPENSSL_STACK *, int);
2813   
2814   void *OPENSSL_sk_set(OPENSSL_STACK *st, int i, const void *data);
2815   
2816   OPENSSL_STACK *OPENSSL_sk_new(OPENSSL_sk_compfunc cmp);
2817   OPENSSL_STACK *OPENSSL_sk_new_null(void);
2818   OPENSSL_STACK *OPENSSL_sk_new_reserve(OPENSSL_sk_compfunc c, int n);
2819   int OPENSSL_sk_reserve(OPENSSL_STACK *st, int n);
2820   void OPENSSL_sk_free(OPENSSL_STACK *);
2821   void OPENSSL_sk_pop_free(OPENSSL_STACK *st, void (*func) (void *));
2822   OPENSSL_STACK *OPENSSL_sk_deep_copy(const OPENSSL_STACK *,
2823                                       OPENSSL_sk_copyfunc c,
2824                                       OPENSSL_sk_freefunc f);
2825   int OPENSSL_sk_insert(OPENSSL_STACK *sk, const void *data, int where);
2826   void *OPENSSL_sk_delete(OPENSSL_STACK *st, int loc);
2827   void *OPENSSL_sk_delete_ptr(OPENSSL_STACK *st, const void *p);
2828   int OPENSSL_sk_find(OPENSSL_STACK *st, const void *data);
2829   int OPENSSL_sk_find_ex(OPENSSL_STACK *st, const void *data);
2830   int OPENSSL_sk_find_all(OPENSSL_STACK *st, const void *data, int *pnum);
2831   int OPENSSL_sk_push(OPENSSL_STACK *st, const void *data);
2832   int OPENSSL_sk_unshift(OPENSSL_STACK *st, const void *data);
2833   void *OPENSSL_sk_shift(OPENSSL_STACK *st);
2834   void *OPENSSL_sk_pop(OPENSSL_STACK *st);
2835   void OPENSSL_sk_zero(OPENSSL_STACK *st);
2836   OPENSSL_sk_compfunc OPENSSL_sk_set_cmp_func(OPENSSL_STACK *sk,
2837                                               OPENSSL_sk_compfunc cmp);
2838   OPENSSL_STACK *OPENSSL_sk_dup(const OPENSSL_STACK *st);
2839   void OPENSSL_sk_sort(OPENSSL_STACK *st);
2840   int OPENSSL_sk_is_sorted(const OPENSSL_STACK *st);
2841   # 25 "include/openssl/safestack.h" 2
2842   # 195 "include/openssl/safestack.h"
2843   typedef char *OPENSSL_STRING;
2844   typedef const char *OPENSSL_CSTRING;
2845   # 205 "include/openssl/safestack.h"
2846   struct stack_st_OPENSSL_STRING; typedef int (*sk_OPENSSL_STRING_compfunc)(const char * const *a, const char *const *b); typedef void (*sk_OPENSSL_STRING_freefunc)(char *a); typedef char * (*sk_OPENSSL_STRING_copyfunc)(const char *a); static __attribute__((unused)) inline char *ossl_check_OPENSSL_STRING_type(char *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_OPENSSL_STRING_sk_type(const struct stack_st_OPENSSL_STRING *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_OPENSSL_STRING_sk_type(struct stack_st_OPENSSL_STRING *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_OPENSSL_STRING_compfunc_type(sk_OPENSSL_STRING_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_OPENSSL_STRING_copyfunc_type(sk_OPENSSL_STRING_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_OPENSSL_STRING_freefunc_type(sk_OPENSSL_STRING_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
2847   # 231 "include/openssl/safestack.h"
2848   struct stack_st_OPENSSL_CSTRING; typedef int (*sk_OPENSSL_CSTRING_compfunc)(const char * const *a, const char *const *b); typedef void (*sk_OPENSSL_CSTRING_freefunc)(char *a); typedef char * (*sk_OPENSSL_CSTRING_copyfunc)(const char *a); static __attribute__((unused)) inline const char *ossl_check_OPENSSL_CSTRING_type(const char *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_OPENSSL_CSTRING_sk_type(const struct stack_st_OPENSSL_CSTRING *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_OPENSSL_CSTRING_sk_type(struct stack_st_OPENSSL_CSTRING *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_OPENSSL_CSTRING_compfunc_type(sk_OPENSSL_CSTRING_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_OPENSSL_CSTRING_copyfunc_type(sk_OPENSSL_CSTRING_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_OPENSSL_CSTRING_freefunc_type(sk_OPENSSL_CSTRING_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
2849   # 264 "include/openssl/safestack.h"
2850   typedef void *OPENSSL_BLOCK;
2851   struct stack_st_OPENSSL_BLOCK; typedef int (*sk_OPENSSL_BLOCK_compfunc)(const void * const *a, const void *const *b); typedef void (*sk_OPENSSL_BLOCK_freefunc)(void *a); typedef void * (*sk_OPENSSL_BLOCK_copyfunc)(const void *a); static __attribute__((unused)) inline void *ossl_check_OPENSSL_BLOCK_type(void *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_OPENSSL_BLOCK_sk_type(const struct stack_st_OPENSSL_BLOCK *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_OPENSSL_BLOCK_sk_type(struct stack_st_OPENSSL_BLOCK *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_OPENSSL_BLOCK_compfunc_type(sk_OPENSSL_BLOCK_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_OPENSSL_BLOCK_copyfunc_type(sk_OPENSSL_BLOCK_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_OPENSSL_BLOCK_freefunc_type(sk_OPENSSL_BLOCK_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
2852   # 35 "include/openssl/crypto.h" 2
2853   
2854   # 1 "include/openssl/types.h" 1
2855   # 26 "include/openssl/types.h"
2856   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/limits.h" 1 3 4
2857   # 27 "include/openssl/types.h" 2
2858   # 36 "include/openssl/types.h"
2859   typedef struct ossl_provider_st OSSL_PROVIDER;
2860   # 57 "include/openssl/types.h"
2861   typedef struct asn1_string_st ASN1_INTEGER;
2862   typedef struct asn1_string_st ASN1_ENUMERATED;
2863   typedef struct asn1_string_st ASN1_BIT_STRING;
2864   typedef struct asn1_string_st ASN1_OCTET_STRING;
2865   typedef struct asn1_string_st ASN1_PRINTABLESTRING;
2866   typedef struct asn1_string_st ASN1_T61STRING;
2867   typedef struct asn1_string_st ASN1_IA5STRING;
2868   typedef struct asn1_string_st ASN1_GENERALSTRING;
2869   typedef struct asn1_string_st ASN1_UNIVERSALSTRING;
2870   typedef struct asn1_string_st ASN1_BMPSTRING;
2871   typedef struct asn1_string_st ASN1_UTCTIME;
2872   typedef struct asn1_string_st ASN1_TIME;
2873   typedef struct asn1_string_st ASN1_GENERALIZEDTIME;
2874   typedef struct asn1_string_st ASN1_VISIBLESTRING;
2875   typedef struct asn1_string_st ASN1_UTF8STRING;
2876   typedef struct asn1_string_st ASN1_STRING;
2877   typedef int ASN1_BOOLEAN;
2878   typedef int ASN1_NULL;
2879   
2880   
2881   typedef struct asn1_type_st ASN1_TYPE;
2882   typedef struct asn1_object_st ASN1_OBJECT;
2883   typedef struct asn1_string_table_st ASN1_STRING_TABLE;
2884   
2885   typedef struct ASN1_ITEM_st ASN1_ITEM;
2886   typedef struct asn1_pctx_st ASN1_PCTX;
2887   typedef struct asn1_sctx_st ASN1_SCTX;
2888   
2889   
2890   
2891   
2892   
2893   typedef struct bio_st BIO;
2894   typedef struct bignum_st BIGNUM;
2895   typedef struct bignum_ctx BN_CTX;
2896   typedef struct bn_blinding_st BN_BLINDING;
2897   typedef struct bn_mont_ctx_st BN_MONT_CTX;
2898   typedef struct bn_recp_ctx_st BN_RECP_CTX;
2899   typedef struct bn_gencb_st BN_GENCB;
2900   
2901   typedef struct buf_mem_st BUF_MEM;
2902   
2903   struct stack_st_BIGNUM;
2904   struct stack_st_BIGNUM_const;
2905   
2906   typedef struct err_state_st ERR_STATE;
2907   
2908   typedef struct evp_cipher_st EVP_CIPHER;
2909   typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
2910   typedef struct evp_md_st EVP_MD;
2911   typedef struct evp_md_ctx_st EVP_MD_CTX;
2912   typedef struct evp_mac_st EVP_MAC;
2913   typedef struct evp_mac_ctx_st EVP_MAC_CTX;
2914   typedef struct evp_pkey_st EVP_PKEY;
2915   
2916   typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
2917   
2918   typedef struct evp_pkey_method_st EVP_PKEY_METHOD;
2919   typedef struct evp_pkey_ctx_st EVP_PKEY_CTX;
2920   
2921   typedef struct evp_keymgmt_st EVP_KEYMGMT;
2922   
2923   typedef struct evp_kdf_st EVP_KDF;
2924   typedef struct evp_kdf_ctx_st EVP_KDF_CTX;
2925   
2926   typedef struct evp_rand_st EVP_RAND;
2927   typedef struct evp_rand_ctx_st EVP_RAND_CTX;
2928   
2929   typedef struct evp_keyexch_st EVP_KEYEXCH;
2930   
2931   typedef struct evp_signature_st EVP_SIGNATURE;
2932   
2933   typedef struct evp_asym_cipher_st EVP_ASYM_CIPHER;
2934   
2935   typedef struct evp_kem_st EVP_KEM;
2936   
2937   typedef struct evp_Encode_Ctx_st EVP_ENCODE_CTX;
2938   
2939   typedef struct hmac_ctx_st HMAC_CTX;
2940   
2941   typedef struct dh_st DH;
2942   typedef struct dh_method DH_METHOD;
2943   
2944   
2945   typedef struct dsa_st DSA;
2946   typedef struct dsa_method DSA_METHOD;
2947   
2948   
2949   
2950   typedef struct rsa_st RSA;
2951   typedef struct rsa_meth_st RSA_METHOD;
2952   
2953   typedef struct rsa_pss_params_st RSA_PSS_PARAMS;
2954   
2955   
2956   typedef struct ec_key_st EC_KEY;
2957   typedef struct ec_key_method_st EC_KEY_METHOD;
2958   
2959   
2960   typedef struct rand_meth_st RAND_METHOD;
2961   typedef struct rand_drbg_st RAND_DRBG;
2962   
2963   typedef struct ssl_dane_st SSL_DANE;
2964   typedef struct x509_st X509;
2965   typedef struct X509_algor_st X509_ALGOR;
2966   typedef struct X509_crl_st X509_CRL;
2967   typedef struct x509_crl_method_st X509_CRL_METHOD;
2968   typedef struct x509_revoked_st X509_REVOKED;
2969   typedef struct X509_name_st X509_NAME;
2970   typedef struct X509_pubkey_st X509_PUBKEY;
2971   typedef struct x509_store_st X509_STORE;
2972   typedef struct x509_store_ctx_st X509_STORE_CTX;
2973   
2974   typedef struct x509_object_st X509_OBJECT;
2975   typedef struct x509_lookup_st X509_LOOKUP;
2976   typedef struct x509_lookup_method_st X509_LOOKUP_METHOD;
2977   typedef struct X509_VERIFY_PARAM_st X509_VERIFY_PARAM;
2978   
2979   typedef struct x509_sig_info_st X509_SIG_INFO;
2980   
2981   typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO;
2982   
2983   typedef struct v3_ext_ctx X509V3_CTX;
2984   typedef struct conf_st CONF;
2985   typedef struct ossl_init_settings_st OPENSSL_INIT_SETTINGS;
2986   
2987   typedef struct ui_st UI;
2988   typedef struct ui_method_st UI_METHOD;
2989   
2990   typedef struct engine_st ENGINE;
2991   typedef struct ssl_st SSL;
2992   typedef struct ssl_ctx_st SSL_CTX;
2993   
2994   typedef struct comp_ctx_st COMP_CTX;
2995   typedef struct comp_method_st COMP_METHOD;
2996   
2997   typedef struct X509_POLICY_NODE_st X509_POLICY_NODE;
2998   typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL;
2999   typedef struct X509_POLICY_TREE_st X509_POLICY_TREE;
3000   typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE;
3001   
3002   typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID;
3003   typedef struct DIST_POINT_st DIST_POINT;
3004   typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT;
3005   typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS;
3006   
3007   typedef struct crypto_ex_data_st CRYPTO_EX_DATA;
3008   
3009   typedef struct ossl_http_req_ctx_st OSSL_HTTP_REQ_CTX;
3010   typedef struct ocsp_response_st OCSP_RESPONSE;
3011   typedef struct ocsp_responder_id_st OCSP_RESPID;
3012   
3013   typedef struct sct_st SCT;
3014   typedef struct sct_ctx_st SCT_CTX;
3015   typedef struct ctlog_st CTLOG;
3016   typedef struct ctlog_store_st CTLOG_STORE;
3017   typedef struct ct_policy_eval_ctx_st CT_POLICY_EVAL_CTX;
3018   
3019   typedef struct ossl_store_info_st OSSL_STORE_INFO;
3020   typedef struct ossl_store_search_st OSSL_STORE_SEARCH;
3021   
3022   typedef struct ossl_lib_ctx_st OSSL_LIB_CTX;
3023   
3024   typedef struct ossl_dispatch_st OSSL_DISPATCH;
3025   typedef struct ossl_item_st OSSL_ITEM;
3026   typedef struct ossl_algorithm_st OSSL_ALGORITHM;
3027   typedef struct ossl_param_st OSSL_PARAM;
3028   typedef struct ossl_param_bld_st OSSL_PARAM_BLD;
3029   
3030   typedef int pem_password_cb (char *buf, int size, int rwflag, void *userdata);
3031   
3032   typedef struct ossl_encoder_st OSSL_ENCODER;
3033   typedef struct ossl_encoder_ctx_st OSSL_ENCODER_CTX;
3034   typedef struct ossl_decoder_st OSSL_DECODER;
3035   typedef struct ossl_decoder_ctx_st OSSL_DECODER_CTX;
3036   
3037   typedef struct ossl_self_test_st OSSL_SELF_TEST;
3038   # 37 "include/openssl/crypto.h" 2
3039   
3040   # 1 "include/openssl/cryptoerr.h" 1
3041   # 13 "include/openssl/cryptoerr.h"
3042           
3043   
3044   
3045   # 1 "include/openssl/symhacks.h" 1
3046   # 12 "include/openssl/symhacks.h"
3047           
3048   # 17 "include/openssl/cryptoerr.h" 2
3049   # 1 "include/openssl/cryptoerr_legacy.h" 1
3050   # 19 "include/openssl/cryptoerr_legacy.h"
3051           
3052   # 29 "include/openssl/cryptoerr_legacy.h"
3053   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_ASN1_strings(void);
3054   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_ASYNC_strings(void);
3055   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_BIO_strings(void);
3056   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_BN_strings(void);
3057   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_BUF_strings(void);
3058   
3059   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_CMS_strings(void);
3060   
3061   
3062   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_COMP_strings(void);
3063   
3064   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_CONF_strings(void);
3065   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_CRYPTO_strings(void);
3066   
3067   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_CT_strings(void);
3068   
3069   
3070   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_DH_strings(void);
3071   
3072   
3073   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_DSA_strings(void);
3074   
3075   
3076   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_EC_strings(void);
3077   
3078   
3079   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_ENGINE_strings(void);
3080   
3081   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_ERR_strings(void);
3082   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_EVP_strings(void);
3083   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_KDF_strings(void);
3084   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_OBJ_strings(void);
3085   
3086   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_OCSP_strings(void);
3087   
3088   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_PEM_strings(void);
3089   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_PKCS12_strings(void);
3090   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_PKCS7_strings(void);
3091   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_RAND_strings(void);
3092   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_RSA_strings(void);
3093   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_OSSL_STORE_strings(void);
3094   
3095   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_TS_strings(void);
3096   
3097   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_UI_strings(void);
3098   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_X509_strings(void);
3099   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_X509V3_strings(void);
3100   # 18 "include/openssl/cryptoerr.h" 2
3101   # 39 "include/openssl/crypto.h" 2
3102   # 1 "include/openssl/core.h" 1
3103   # 12 "include/openssl/core.h"
3104           
3105   
3106   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 1 3 4
3107   # 143 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 3 4
3108   
3109   # 143 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 3 4
3110   typedef long int ptrdiff_t;
3111   # 415 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 3 4
3112   typedef struct {
3113     long long __max_align_ll __attribute__((__aligned__(__alignof__(long long))));
3114     long double __max_align_ld __attribute__((__aligned__(__alignof__(long double))));
3115   # 426 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 3 4
3116   } max_align_t;
3117   # 15 "include/openssl/core.h" 2
3118   # 1 "include/openssl/types.h" 1
3119   # 16 "include/openssl/core.h" 2
3120   # 30 "include/openssl/core.h"
3121   
3122   # 30 "include/openssl/core.h"
3123   typedef struct ossl_core_handle_st OSSL_CORE_HANDLE;
3124   typedef struct openssl_core_ctx_st OPENSSL_CORE_CTX;
3125   typedef struct ossl_core_bio_st OSSL_CORE_BIO;
3126   
3127   
3128   
3129   
3130   
3131   
3132   
3133   struct ossl_dispatch_st {
3134       int function_id;
3135       void (*function)(void);
3136   };
3137   # 61 "include/openssl/core.h"
3138   struct ossl_item_st {
3139       unsigned int id;
3140       void *ptr;
3141   };
3142   
3143   
3144   
3145   
3146   
3147   
3148   
3149   struct ossl_algorithm_st {
3150       const char *algorithm_names;
3151       const char *property_definition;
3152       const OSSL_DISPATCH *implementation;
3153       const char *algorithm_description;
3154   };
3155   
3156   
3157   
3158   
3159   
3160   
3161   
3162   struct ossl_param_st {
3163       const char *key;
3164       unsigned int data_type;
3165       void *data;
3166       size_t data_size;
3167       size_t return_size;
3168   };
3169   # 172 "include/openssl/core.h"
3170   typedef void (*OSSL_thread_stop_handler_fn)(void *arg);
3171   # 193 "include/openssl/core.h"
3172   typedef int (OSSL_provider_init_fn)(const OSSL_CORE_HANDLE *handle,
3173                                       const OSSL_DISPATCH *in,
3174                                       const OSSL_DISPATCH **out,
3175                                       void **provctx);
3176   
3177   
3178   
3179   
3180   extern OSSL_provider_init_fn OSSL_provider_init;
3181   # 219 "include/openssl/core.h"
3182   typedef int (OSSL_CALLBACK)(const OSSL_PARAM params[], void *arg);
3183   typedef int (OSSL_INOUT_CALLBACK)(const OSSL_PARAM in_params[],
3184                                     OSSL_PARAM out_params[], void *arg);
3185   
3186   
3187   
3188   
3189   
3190   
3191   typedef int (OSSL_PASSPHRASE_CALLBACK)(char *pass, size_t pass_size,
3192                                          size_t *pass_len,
3193                                          const OSSL_PARAM params[], void *arg);
3194   # 40 "include/openssl/crypto.h" 2
3195   # 73 "include/openssl/crypto.h"
3196   typedef struct {
3197       int dummy;
3198   } CRYPTO_dynlock;
3199   
3200   
3201   
3202   typedef void CRYPTO_RWLOCK;
3203   
3204   CRYPTO_RWLOCK *CRYPTO_THREAD_lock_new(void);
3205    int CRYPTO_THREAD_read_lock(CRYPTO_RWLOCK *lock);
3206    int CRYPTO_THREAD_write_lock(CRYPTO_RWLOCK *lock);
3207   int CRYPTO_THREAD_unlock(CRYPTO_RWLOCK *lock);
3208   void CRYPTO_THREAD_lock_free(CRYPTO_RWLOCK *lock);
3209   
3210   int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock);
3211   int CRYPTO_atomic_or(uint64_t *val, uint64_t op, uint64_t *ret,
3212                        CRYPTO_RWLOCK *lock);
3213   int CRYPTO_atomic_load(uint64_t *val, uint64_t *ret, CRYPTO_RWLOCK *lock);
3214   int CRYPTO_atomic_load_int(int *val, int *ret, CRYPTO_RWLOCK *lock);
3215   # 125 "include/openssl/crypto.h"
3216   size_t OPENSSL_strlcpy(char *dst, const char *src, size_t siz);
3217   size_t OPENSSL_strlcat(char *dst, const char *src, size_t siz);
3218   size_t OPENSSL_strnlen(const char *str, size_t maxlen);
3219   int OPENSSL_buf2hexstr_ex(char *str, size_t str_n, size_t *strlength,
3220                             const unsigned char *buf, size_t buflen,
3221                             const char sep);
3222   char *OPENSSL_buf2hexstr(const unsigned char *buf, long buflen);
3223   int OPENSSL_hexstr2buf_ex(unsigned char *buf, size_t buf_n, size_t *buflen,
3224                             const char *str, const char sep);
3225   unsigned char *OPENSSL_hexstr2buf(const char *str, long *buflen);
3226   int OPENSSL_hexchar2int(unsigned char c);
3227   int OPENSSL_strcasecmp(const char *s1, const char *s2);
3228   int OPENSSL_strncasecmp(const char *s1, const char *s2, size_t n);
3229   # 146 "include/openssl/crypto.h"
3230   unsigned int OPENSSL_version_major(void);
3231   unsigned int OPENSSL_version_minor(void);
3232   unsigned int OPENSSL_version_patch(void);
3233   const char *OPENSSL_version_pre_release(void);
3234   const char *OPENSSL_version_build_metadata(void);
3235   
3236   unsigned long OpenSSL_version_num(void);
3237   const char *OpenSSL_version(int type);
3238   # 165 "include/openssl/crypto.h"
3239   const char *OPENSSL_info(int type);
3240   # 179 "include/openssl/crypto.h"
3241   int OPENSSL_issetugid(void);
3242   
3243   struct crypto_ex_data_st {
3244       OSSL_LIB_CTX *ctx;
3245       struct stack_st_void *sk;
3246   };
3247   
3248   struct stack_st_void; typedef int (*sk_void_compfunc)(const void * const *a, const void *const *b); typedef void (*sk_void_freefunc)(void *a); typedef void * (*sk_void_copyfunc)(const void *a); static __attribute__((unused)) inline void *ossl_check_void_type(void *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_void_sk_type(const struct stack_st_void *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_void_sk_type(struct stack_st_void *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_void_compfunc_type(sk_void_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_void_copyfunc_type(sk_void_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_void_freefunc_type(sk_void_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
3249   # 239 "include/openssl/crypto.h"
3250   typedef void CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
3251                              int idx, long argl, void *argp);
3252   typedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
3253                                int idx, long argl, void *argp);
3254   typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from,
3255                              void **from_d, int idx, long argl, void *argp);
3256    int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,
3257                                      CRYPTO_EX_new *new_func,
3258                                      CRYPTO_EX_dup *dup_func,
3259                                      CRYPTO_EX_free *free_func);
3260   
3261   int CRYPTO_free_ex_index(int class_index, int idx);
3262   
3263   
3264   
3265   
3266   
3267   int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
3268   int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
3269                          const CRYPTO_EX_DATA *from);
3270   
3271   void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
3272   
3273   
3274   int CRYPTO_alloc_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad,
3275                            int idx);
3276   
3277   
3278   
3279   
3280   
3281   int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val);
3282   void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
3283   # 307 "include/openssl/crypto.h"
3284   typedef struct crypto_threadid_st {
3285       int dummy;
3286   } CRYPTO_THREADID;
3287   # 334 "include/openssl/crypto.h"
3288   typedef void *(*CRYPTO_malloc_fn)(size_t num, const char *file, int line);
3289   typedef void *(*CRYPTO_realloc_fn)(void *addr, size_t num, const char *file,
3290                                      int line);
3291   typedef void (*CRYPTO_free_fn)(void *addr, const char *file, int line);
3292   int CRYPTO_set_mem_functions(CRYPTO_malloc_fn malloc_fn,
3293                                CRYPTO_realloc_fn realloc_fn,
3294                                CRYPTO_free_fn free_fn);
3295   void CRYPTO_get_mem_functions(CRYPTO_malloc_fn *malloc_fn,
3296                                 CRYPTO_realloc_fn *realloc_fn,
3297                                 CRYPTO_free_fn *free_fn);
3298   
3299   __attribute__((__malloc__)) void *CRYPTO_malloc(size_t num, const char *file, int line);
3300   __attribute__((__malloc__)) void *CRYPTO_zalloc(size_t num, const char *file, int line);
3301   __attribute__((__malloc__)) void *CRYPTO_memdup(const void *str, size_t siz, const char *file, int line);
3302   __attribute__((__malloc__)) char *CRYPTO_strdup(const char *str, const char *file, int line);
3303   __attribute__((__malloc__)) char *CRYPTO_strndup(const char *str, size_t s, const char *file, int line);
3304   void CRYPTO_free(void *ptr, const char *file, int line);
3305   void CRYPTO_clear_free(void *ptr, size_t num, const char *file, int line);
3306   void *CRYPTO_realloc(void *addr, size_t num, const char *file, int line);
3307   void *CRYPTO_clear_realloc(void *addr, size_t old_num, size_t num,
3308                              const char *file, int line);
3309   
3310   int CRYPTO_secure_malloc_init(size_t sz, size_t minsize);
3311   int CRYPTO_secure_malloc_done(void);
3312   __attribute__((__malloc__)) void *CRYPTO_secure_malloc(size_t num, const char *file, int line);
3313   __attribute__((__malloc__)) void *CRYPTO_secure_zalloc(size_t num, const char *file, int line);
3314   void CRYPTO_secure_free(void *ptr, const char *file, int line);
3315   void CRYPTO_secure_clear_free(void *ptr, size_t num,
3316                                 const char *file, int line);
3317   int CRYPTO_secure_allocated(const void *ptr);
3318   int CRYPTO_secure_malloc_initialized(void);
3319   size_t CRYPTO_secure_actual_size(void *ptr);
3320   size_t CRYPTO_secure_used(void);
3321   
3322   void OPENSSL_cleanse(void *ptr, size_t len);
3323   # 416 "include/openssl/crypto.h"
3324   _Noreturn void OPENSSL_die(const char *assertion, const char *file, int line);
3325   
3326   
3327   
3328   
3329   
3330   
3331   int OPENSSL_isservice(void);
3332   
3333   void OPENSSL_init(void);
3334   
3335   
3336   __attribute__((deprecated("Since OpenSSL " "3.0"))) void OPENSSL_fork_prepare(void);
3337   __attribute__((deprecated("Since OpenSSL " "3.0"))) void OPENSSL_fork_parent(void);
3338   __attribute__((deprecated("Since OpenSSL " "3.0"))) void OPENSSL_fork_child(void);
3339   
3340   
3341   
3342   struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result);
3343   int OPENSSL_gmtime_adj(struct tm *tm, int offset_day, long offset_sec);
3344   int OPENSSL_gmtime_diff(int *pday, int *psec,
3345                           const struct tm *from, const struct tm *to);
3346   # 446 "include/openssl/crypto.h"
3347   int CRYPTO_memcmp(const void * in_a, const void * in_b, size_t len);
3348   # 485 "include/openssl/crypto.h"
3349   void OPENSSL_cleanup(void);
3350   int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
3351   int OPENSSL_atexit(void (*handler)(void));
3352   void OPENSSL_thread_stop(void);
3353   void OPENSSL_thread_stop_ex(OSSL_LIB_CTX *ctx);
3354   
3355   
3356   OPENSSL_INIT_SETTINGS *OPENSSL_INIT_new(void);
3357   
3358   int OPENSSL_INIT_set_config_filename(OPENSSL_INIT_SETTINGS *settings,
3359                                        const char *config_filename);
3360   void OPENSSL_INIT_set_config_file_flags(OPENSSL_INIT_SETTINGS *settings,
3361                                           unsigned long flags);
3362   int OPENSSL_INIT_set_config_appname(OPENSSL_INIT_SETTINGS *settings,
3363                                       const char *config_appname);
3364   
3365   void OPENSSL_INIT_free(OPENSSL_INIT_SETTINGS *settings);
3366   # 519 "include/openssl/crypto.h"
3367   # 1 "/usr/include/pthread.h" 1 3 4
3368   # 22 "/usr/include/pthread.h" 3 4
3369   # 1 "/usr/include/sched.h" 1 3 4
3370   # 29 "/usr/include/sched.h" 3 4
3371   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 1 3 4
3372   # 30 "/usr/include/sched.h" 2 3 4
3373   # 43 "/usr/include/sched.h" 3 4
3374   # 1 "/usr/include/x86_64-linux-gnu/bits/sched.h" 1 3 4
3375   # 76 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4
3376   # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h" 1 3 4
3377   # 23 "/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h" 3 4
3378   
3379   # 23 "/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h" 3 4
3380   struct sched_param
3381   {
3382     int sched_priority;
3383   };
3384   # 77 "/usr/include/x86_64-linux-gnu/bits/sched.h" 2 3 4
3385   
3386   
3387   # 98 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4
3388   
3389   # 44 "/usr/include/sched.h" 2 3 4
3390   # 1 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 1 3 4
3391   # 32 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 3 4
3392   typedef unsigned long int __cpu_mask;
3393   
3394   
3395   
3396   
3397   
3398   
3399   typedef struct
3400   {
3401     __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];
3402   } cpu_set_t;
3403   # 115 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 3 4
3404   
3405   
3406   extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
3407        __attribute__ ((__nothrow__ , __leaf__));
3408   extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
3409   extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__ , __leaf__));
3410   
3411   
3412   # 45 "/usr/include/sched.h" 2 3 4
3413   
3414   
3415   
3416   
3417   
3418   
3419   
3420   
3421   
3422   extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
3423        __attribute__ ((__nothrow__ , __leaf__));
3424   
3425   
3426   extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__));
3427   
3428   
3429   extern int sched_setscheduler (__pid_t __pid, int __policy,
3430             const struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__));
3431   
3432   
3433   extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
3434   
3435   
3436   extern int sched_yield (void) __attribute__ ((__nothrow__ , __leaf__));
3437   
3438   
3439   extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__ , __leaf__));
3440   
3441   
3442   extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__ , __leaf__));
3443   
3444   
3445   
3446   extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__ , __leaf__));
3447   # 138 "/usr/include/sched.h" 3 4
3448   
3449   # 23 "/usr/include/pthread.h" 2 3 4
3450   
3451   
3452   
3453   
3454   # 1 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 1 3 4
3455   # 26 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 3 4
3456   # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
3457   # 27 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 2 3 4
3458   
3459   
3460   
3461   
3462   typedef long int __jmp_buf[8];
3463   # 28 "/usr/include/pthread.h" 2 3 4
3464   # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
3465   # 29 "/usr/include/pthread.h" 2 3 4
3466   
3467   
3468   # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h" 1 3 4
3469   # 26 "/usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h" 3 4
3470   struct __jmp_buf_tag
3471     {
3472   
3473   
3474   
3475   
3476       __jmp_buf __jmpbuf;
3477       int __mask_was_saved;
3478       __sigset_t __saved_mask;
3479     };
3480   # 32 "/usr/include/pthread.h" 2 3 4
3481   
3482   
3483   
3484   
3485   
3486   enum
3487   {
3488     PTHREAD_CREATE_JOINABLE,
3489   
3490     PTHREAD_CREATE_DETACHED
3491   
3492   };
3493   
3494   
3495   
3496   enum
3497   {
3498     PTHREAD_MUTEX_TIMED_NP,
3499     PTHREAD_MUTEX_RECURSIVE_NP,
3500     PTHREAD_MUTEX_ERRORCHECK_NP,
3501     PTHREAD_MUTEX_ADAPTIVE_NP
3502   
3503     ,
3504     PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
3505     PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
3506     PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
3507     PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
3508   
3509   
3510   
3511   
3512   
3513   };
3514   
3515   
3516   
3517   
3518   enum
3519   {
3520     PTHREAD_MUTEX_STALLED,
3521     PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
3522     PTHREAD_MUTEX_ROBUST,
3523     PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
3524   };
3525   
3526   
3527   
3528   
3529   
3530   enum
3531   {
3532     PTHREAD_PRIO_NONE,
3533     PTHREAD_PRIO_INHERIT,
3534     PTHREAD_PRIO_PROTECT
3535   };
3536   # 104 "/usr/include/pthread.h" 3 4
3537   enum
3538   {
3539     PTHREAD_RWLOCK_PREFER_READER_NP,
3540     PTHREAD_RWLOCK_PREFER_WRITER_NP,
3541     PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
3542     PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
3543   };
3544   # 124 "/usr/include/pthread.h" 3 4
3545   enum
3546   {
3547     PTHREAD_INHERIT_SCHED,
3548   
3549     PTHREAD_EXPLICIT_SCHED
3550   
3551   };
3552   
3553   
3554   
3555   enum
3556   {
3557     PTHREAD_SCOPE_SYSTEM,
3558   
3559     PTHREAD_SCOPE_PROCESS
3560   
3561   };
3562   
3563   
3564   
3565   enum
3566   {
3567     PTHREAD_PROCESS_PRIVATE,
3568   
3569     PTHREAD_PROCESS_SHARED
3570   
3571   };
3572   # 159 "/usr/include/pthread.h" 3 4
3573   struct _pthread_cleanup_buffer
3574   {
3575     void (*__routine) (void *);
3576     void *__arg;
3577     int __canceltype;
3578     struct _pthread_cleanup_buffer *__prev;
3579   };
3580   
3581   
3582   enum
3583   {
3584     PTHREAD_CANCEL_ENABLE,
3585   
3586     PTHREAD_CANCEL_DISABLE
3587   
3588   };
3589   enum
3590   {
3591     PTHREAD_CANCEL_DEFERRED,
3592   
3593     PTHREAD_CANCEL_ASYNCHRONOUS
3594   
3595   };
3596   # 197 "/usr/include/pthread.h" 3 4
3597   
3598   
3599   
3600   
3601   
3602   extern int pthread_create (pthread_t *__restrict __newthread,
3603         const pthread_attr_t *__restrict __attr,
3604         void *(*__start_routine) (void *),
3605         void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
3606   
3607   
3608   
3609   
3610   
3611   extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
3612   
3613   
3614   
3615   
3616   
3617   
3618   
3619   extern int pthread_join (pthread_t __th, void **__thread_return);
3620   # 269 "/usr/include/pthread.h" 3 4
3621   extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__ , __leaf__));
3622   
3623   
3624   
3625   extern pthread_t pthread_self (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3626   
3627   
3628   extern int pthread_equal (pthread_t __thread1, pthread_t __thread2)
3629     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3630   
3631   
3632   
3633   
3634   
3635   
3636   
3637   extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3638   
3639   
3640   extern int pthread_attr_destroy (pthread_attr_t *__attr)
3641        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3642   
3643   
3644   extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr,
3645        int *__detachstate)
3646        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3647   
3648   
3649   extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
3650        int __detachstate)
3651        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3652   
3653   
3654   
3655   extern int pthread_attr_getguardsize (const pthread_attr_t *__attr,
3656             size_t *__guardsize)
3657        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3658   
3659   
3660   extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
3661             size_t __guardsize)
3662        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3663   
3664   
3665   
3666   extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr,
3667              struct sched_param *__restrict __param)
3668        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3669   
3670   
3671   extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
3672              const struct sched_param *__restrict
3673              __param) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3674   
3675   
3676   extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict
3677        __attr, int *__restrict __policy)
3678        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3679   
3680   
3681   extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
3682        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3683   
3684   
3685   extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict
3686         __attr, int *__restrict __inherit)
3687        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3688   
3689   
3690   extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
3691         int __inherit)
3692        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3693   
3694   
3695   
3696   extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr,
3697         int *__restrict __scope)
3698        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3699   
3700   
3701   extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
3702        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3703   
3704   
3705   extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict
3706             __attr, void **__restrict __stackaddr)
3707        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__));
3708   
3709   
3710   
3711   
3712   
3713   extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
3714             void *__stackaddr)
3715        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__));
3716   
3717   
3718   extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict
3719             __attr, size_t *__restrict __stacksize)
3720        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3721   
3722   
3723   
3724   
3725   extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
3726             size_t __stacksize)
3727        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3728   
3729   
3730   
3731   extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr,
3732         void **__restrict __stackaddr,
3733         size_t *__restrict __stacksize)
3734        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3)));
3735   
3736   
3737   
3738   
3739   extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
3740         size_t __stacksize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3741   # 441 "/usr/include/pthread.h" 3 4
3742   extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
3743         const struct sched_param *__param)
3744        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
3745   
3746   
3747   extern int pthread_getschedparam (pthread_t __target_thread,
3748         int *__restrict __policy,
3749         struct sched_param *__restrict __param)
3750        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
3751   
3752   
3753   extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
3754        __attribute__ ((__nothrow__ , __leaf__));
3755   # 509 "/usr/include/pthread.h" 3 4
3756   extern int pthread_once (pthread_once_t *__once_control,
3757       void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2)));
3758   # 521 "/usr/include/pthread.h" 3 4
3759   extern int pthread_setcancelstate (int __state, int *__oldstate);
3760   
3761   
3762   
3763   extern int pthread_setcanceltype (int __type, int *__oldtype);
3764   
3765   
3766   extern int pthread_cancel (pthread_t __th);
3767   
3768   
3769   
3770   
3771   extern void pthread_testcancel (void);
3772   
3773   
3774   
3775   
3776   struct __cancel_jmp_buf_tag
3777   {
3778     __jmp_buf __cancel_jmp_buf;
3779     int __mask_was_saved;
3780   };
3781   
3782   typedef struct
3783   {
3784     struct __cancel_jmp_buf_tag __cancel_jmp_buf[1];
3785     void *__pad[4];
3786   } __pthread_unwind_buf_t __attribute__ ((__aligned__));
3787   # 557 "/usr/include/pthread.h" 3 4
3788   struct __pthread_cleanup_frame
3789   {
3790     void (*__cancel_routine) (void *);
3791     void *__cancel_arg;
3792     int __do_it;
3793     int __cancel_type;
3794   };
3795   # 697 "/usr/include/pthread.h" 3 4
3796   extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
3797        ;
3798   # 709 "/usr/include/pthread.h" 3 4
3799   extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
3800     ;
3801   # 750 "/usr/include/pthread.h" 3 4
3802   extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
3803        __attribute__ ((__noreturn__))
3804   
3805        __attribute__ ((__weak__))
3806   
3807        ;
3808   # 766 "/usr/include/pthread.h" 3 4
3809   extern int __sigsetjmp_cancel (struct __cancel_jmp_buf_tag __env[1], int __savemask) __asm__ ("" "__sigsetjmp") __attribute__ ((__nothrow__))
3810   
3811   
3812                        __attribute__ ((__returns_twice__));
3813   # 781 "/usr/include/pthread.h" 3 4
3814   extern int pthread_mutex_init (pthread_mutex_t *__mutex,
3815             const pthread_mutexattr_t *__mutexattr)
3816        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3817   
3818   
3819   extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
3820        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3821   
3822   
3823   extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
3824        __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3825   
3826   
3827   extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
3828        __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3829   
3830   
3831   
3832   
3833   extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
3834           const struct timespec *__restrict
3835           __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3836   # 835 "/usr/include/pthread.h" 3 4
3837   extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
3838        __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3839   
3840   
3841   
3842   extern int pthread_mutex_getprioceiling (const pthread_mutex_t *
3843         __restrict __mutex,
3844         int *__restrict __prioceiling)
3845        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3846   
3847   
3848   
3849   extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
3850         int __prioceiling,
3851         int *__restrict __old_ceiling)
3852        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
3853   
3854   
3855   
3856   
3857   extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)
3858        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3859   # 874 "/usr/include/pthread.h" 3 4
3860   extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)
3861        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3862   
3863   
3864   extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)
3865        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3866   
3867   
3868   extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t *
3869         __restrict __attr,
3870         int *__restrict __pshared)
3871        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3872   
3873   
3874   extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
3875         int __pshared)
3876        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3877   
3878   
3879   
3880   extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict
3881             __attr, int *__restrict __kind)
3882        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3883   
3884   
3885   
3886   
3887   extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
3888        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3889   
3890   
3891   
3892   extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *
3893          __restrict __attr,
3894          int *__restrict __protocol)
3895        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3896   
3897   
3898   
3899   extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
3900          int __protocol)
3901        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3902   
3903   
3904   extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *
3905             __restrict __attr,
3906             int *__restrict __prioceiling)
3907        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3908   
3909   
3910   extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
3911             int __prioceiling)
3912        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3913   
3914   
3915   
3916   extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,
3917        int *__robustness)
3918        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3919   # 946 "/usr/include/pthread.h" 3 4
3920   extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
3921        int __robustness)
3922        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3923   # 967 "/usr/include/pthread.h" 3 4
3924   extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
3925       const pthread_rwlockattr_t *__restrict
3926       __attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3927   
3928   
3929   extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
3930        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3931   
3932   
3933   extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
3934        __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3935   
3936   
3937   extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
3938     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3939   
3940   
3941   
3942   
3943   extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
3944              const struct timespec *__restrict
3945              __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3946   # 1023 "/usr/include/pthread.h" 3 4
3947   extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
3948        __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3949   
3950   
3951   extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
3952        __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3953   
3954   
3955   
3956   
3957   extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
3958              const struct timespec *__restrict
3959              __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3960   # 1071 "/usr/include/pthread.h" 3 4
3961   extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
3962        __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3963   
3964   
3965   
3966   
3967   
3968   extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)
3969        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3970   
3971   
3972   extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)
3973        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3974   
3975   
3976   extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *
3977          __restrict __attr,
3978          int *__restrict __pshared)
3979        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3980   
3981   
3982   extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
3983          int __pshared)
3984        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3985   
3986   
3987   extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *
3988          __restrict __attr,
3989          int *__restrict __pref)
3990        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
3991   
3992   
3993   extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
3994          int __pref) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3995   
3996   
3997   
3998   
3999   
4000   
4001   
4002   extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
4003            const pthread_condattr_t *__restrict __cond_attr)
4004        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4005   
4006   
4007   extern int pthread_cond_destroy (pthread_cond_t *__cond)
4008        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4009   
4010   
4011   extern int pthread_cond_signal (pthread_cond_t *__cond)
4012        __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4013   
4014   
4015   extern int pthread_cond_broadcast (pthread_cond_t *__cond)
4016        __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4017   
4018   
4019   
4020   
4021   
4022   
4023   extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
4024            pthread_mutex_t *__restrict __mutex)
4025        __attribute__ ((__nonnull__ (1, 2)));
4026   # 1145 "/usr/include/pthread.h" 3 4
4027   extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
4028          pthread_mutex_t *__restrict __mutex,
4029          const struct timespec *__restrict __abstime)
4030        __attribute__ ((__nonnull__ (1, 2, 3)));
4031   # 1194 "/usr/include/pthread.h" 3 4
4032   extern int pthread_condattr_init (pthread_condattr_t *__attr)
4033        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4034   
4035   
4036   extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
4037        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4038   
4039   
4040   extern int pthread_condattr_getpshared (const pthread_condattr_t *
4041        __restrict __attr,
4042        int *__restrict __pshared)
4043        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4044   
4045   
4046   extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
4047        int __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4048   
4049   
4050   
4051   extern int pthread_condattr_getclock (const pthread_condattr_t *
4052             __restrict __attr,
4053             __clockid_t *__restrict __clock_id)
4054        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4055   
4056   
4057   extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
4058             __clockid_t __clock_id)
4059        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4060   # 1230 "/usr/include/pthread.h" 3 4
4061   extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
4062        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4063   
4064   
4065   extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
4066        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4067   
4068   
4069   extern int pthread_spin_lock (pthread_spinlock_t *__lock)
4070        __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4071   
4072   
4073   extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
4074        __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4075   
4076   
4077   extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
4078        __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4079   
4080   
4081   
4082   
4083   
4084   
4085   extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
4086        const pthread_barrierattr_t *__restrict
4087        __attr, unsigned int __count)
4088        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4089   
4090   
4091   extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
4092        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4093   
4094   
4095   extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
4096        __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
4097   
4098   
4099   
4100   extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)
4101        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4102   
4103   
4104   extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
4105        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4106   
4107   
4108   extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *
4109           __restrict __attr,
4110           int *__restrict __pshared)
4111        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4112   
4113   
4114   extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
4115           int __pshared)
4116        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4117   # 1297 "/usr/include/pthread.h" 3 4
4118   extern int pthread_key_create (pthread_key_t *__key,
4119             void (*__destr_function) (void *))
4120        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4121   
4122   
4123   extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__));
4124   
4125   
4126   extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__));
4127   
4128   
4129   extern int pthread_setspecific (pthread_key_t __key,
4130       const void *__pointer)
4131     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__access__ (__none__, 2)));
4132   
4133   
4134   
4135   
4136   extern int pthread_getcpuclockid (pthread_t __thread_id,
4137         __clockid_t *__clock_id)
4138        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
4139   # 1332 "/usr/include/pthread.h" 3 4
4140   extern int pthread_atfork (void (*__prepare) (void),
4141         void (*__parent) (void),
4142         void (*__child) (void)) __attribute__ ((__nothrow__ , __leaf__));
4143   
4144   
4145   
4146   
4147   extern __inline __attribute__ ((__gnu_inline__)) int
4148   __attribute__ ((__nothrow__ , __leaf__)) pthread_equal (pthread_t __thread1, pthread_t __thread2)
4149   {
4150     return __thread1 == __thread2;
4151   }
4152   
4153   
4154   
4155   # 520 "include/openssl/crypto.h" 2
4156   
4157   
4158   # 521 "include/openssl/crypto.h"
4159   typedef pthread_once_t CRYPTO_ONCE;
4160   typedef pthread_key_t CRYPTO_THREAD_LOCAL;
4161   typedef pthread_t CRYPTO_THREAD_ID;
4162   # 536 "include/openssl/crypto.h"
4163   int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void));
4164   
4165   int CRYPTO_THREAD_init_local(CRYPTO_THREAD_LOCAL *key, void (*cleanup)(void *));
4166   void *CRYPTO_THREAD_get_local(CRYPTO_THREAD_LOCAL *key);
4167   int CRYPTO_THREAD_set_local(CRYPTO_THREAD_LOCAL *key, void *val);
4168   int CRYPTO_THREAD_cleanup_local(CRYPTO_THREAD_LOCAL *key);
4169   
4170   CRYPTO_THREAD_ID CRYPTO_THREAD_get_current_id(void);
4171   int CRYPTO_THREAD_compare_id(CRYPTO_THREAD_ID a, CRYPTO_THREAD_ID b);
4172   
4173   OSSL_LIB_CTX *OSSL_LIB_CTX_new(void);
4174   OSSL_LIB_CTX *OSSL_LIB_CTX_new_from_dispatch(const OSSL_CORE_HANDLE *handle,
4175                                                const OSSL_DISPATCH *in);
4176   OSSL_LIB_CTX *OSSL_LIB_CTX_new_child(const OSSL_CORE_HANDLE *handle,
4177                                        const OSSL_DISPATCH *in);
4178   int OSSL_LIB_CTX_load_config(OSSL_LIB_CTX *ctx, const char *config_file);
4179   void OSSL_LIB_CTX_free(OSSL_LIB_CTX *);
4180   OSSL_LIB_CTX *OSSL_LIB_CTX_get0_global_default(void);
4181   OSSL_LIB_CTX *OSSL_LIB_CTX_set0_default(OSSL_LIB_CTX *libctx);
4182   
4183   void OSSL_sleep(uint64_t millis);
4184   # 18 "include/internal/e_os.h" 2
4185   # 1 "include/internal/numbers.h" 1
4186   # 12 "include/internal/numbers.h"
4187           
4188   
4189   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/limits.h" 1 3 4
4190   # 15 "include/internal/numbers.h" 2
4191   # 91 "include/internal/numbers.h"
4192   typedef __int128_t int128_t;
4193   typedef __uint128_t uint128_t;
4194   # 19 "include/internal/e_os.h" 2
4195   # 188 "include/internal/e_os.h"
4196   # 1 "/usr/include/x86_64-linux-gnu/sys/time.h" 1 3 4
4197   # 34 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4
4198   
4199   # 52 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4
4200   
4201   # 52 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4
4202   struct timezone
4203     {
4204       int tz_minuteswest;
4205       int tz_dsttime;
4206     };
4207   # 67 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4
4208   extern int gettimeofday (struct timeval *__restrict __tv,
4209       void *__restrict __tz) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4210   # 86 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4
4211   extern int settimeofday (const struct timeval *__tv,
4212       const struct timezone *__tz)
4213        __attribute__ ((__nothrow__ , __leaf__));
4214   
4215   
4216   
4217   
4218   
4219   extern int adjtime (const struct timeval *__delta,
4220         struct timeval *__olddelta) __attribute__ ((__nothrow__ , __leaf__));
4221   # 114 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4
4222   enum __itimer_which
4223     {
4224   
4225       ITIMER_REAL = 0,
4226   
4227   
4228       ITIMER_VIRTUAL = 1,
4229   
4230   
4231   
4232       ITIMER_PROF = 2
4233   
4234     };
4235   
4236   
4237   
4238   struct itimerval
4239     {
4240   
4241       struct timeval it_interval;
4242   
4243       struct timeval it_value;
4244     };
4245   
4246   
4247   
4248   
4249   
4250   
4251   typedef int __itimer_which_t;
4252   
4253   
4254   
4255   
4256   
4257   extern int getitimer (__itimer_which_t __which,
4258           struct itimerval *__value) __attribute__ ((__nothrow__ , __leaf__));
4259   
4260   
4261   
4262   
4263   extern int setitimer (__itimer_which_t __which,
4264           const struct itimerval *__restrict __new,
4265           struct itimerval *__restrict __old) __attribute__ ((__nothrow__ , __leaf__));
4266   
4267   
4268   
4269   
4270   extern int utimes (const char *__file, const struct timeval __tvp[2])
4271        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4272   # 189 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4
4273   extern int lutimes (const char *__file, const struct timeval __tvp[2])
4274        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4275   
4276   
4277   extern int futimes (int __fd, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__));
4278   # 258 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4
4279   
4280   # 189 "include/internal/e_os.h" 2
4281   # 236 "include/internal/e_os.h"
4282   # 1 "/usr/include/unistd.h" 1 3 4
4283   # 27 "/usr/include/unistd.h" 3 4
4284   
4285   # 202 "/usr/include/unistd.h" 3 4
4286   # 1 "/usr/include/x86_64-linux-gnu/bits/posix_opt.h" 1 3 4
4287   # 203 "/usr/include/unistd.h" 2 3 4
4288   
4289   
4290   
4291   # 1 "/usr/include/x86_64-linux-gnu/bits/environments.h" 1 3 4
4292   # 22 "/usr/include/x86_64-linux-gnu/bits/environments.h" 3 4
4293   # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
4294   # 23 "/usr/include/x86_64-linux-gnu/bits/environments.h" 2 3 4
4295   # 207 "/usr/include/unistd.h" 2 3 4
4296   # 226 "/usr/include/unistd.h" 3 4
4297   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 1 3 4
4298   # 227 "/usr/include/unistd.h" 2 3 4
4299   # 255 "/usr/include/unistd.h" 3 4
4300   typedef __useconds_t useconds_t;
4301   # 274 "/usr/include/unistd.h" 3 4
4302   typedef __socklen_t socklen_t;
4303   # 287 "/usr/include/unistd.h" 3 4
4304   extern int access (const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
4305   # 309 "/usr/include/unistd.h" 3 4
4306   extern int faccessat (int __fd, const char *__file, int __type, int __flag)
4307        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
4308   # 339 "/usr/include/unistd.h" 3 4
4309   extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__ , __leaf__));
4310   # 358 "/usr/include/unistd.h" 3 4
4311   extern int close (int __fd);
4312   
4313   
4314   
4315   
4316   extern void closefrom (int __lowfd) __attribute__ ((__nothrow__ , __leaf__));
4317   
4318   
4319   
4320   
4321   
4322   
4323   
4324   extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__))
4325       __attribute__ ((__access__ (__write_only__, 2, 3)));
4326   
4327   
4328   
4329   
4330   
4331   extern ssize_t write (int __fd, const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__))
4332       __attribute__ ((__access__ (__read_only__, 2, 3)));
4333   # 389 "/usr/include/unistd.h" 3 4
4334   extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
4335           __off_t __offset) __attribute__ ((__warn_unused_result__))
4336       __attribute__ ((__access__ (__write_only__, 2, 3)));
4337   
4338   
4339   
4340   
4341   
4342   
4343   extern ssize_t pwrite (int __fd, const void *__buf, size_t __n,
4344            __off_t __offset) __attribute__ ((__warn_unused_result__))
4345       __attribute__ ((__access__ (__read_only__, 2, 3)));
4346   # 437 "/usr/include/unistd.h" 3 4
4347   extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
4348   # 452 "/usr/include/unistd.h" 3 4
4349   extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__ , __leaf__));
4350   # 464 "/usr/include/unistd.h" 3 4
4351   extern unsigned int sleep (unsigned int __seconds);
4352   
4353   
4354   
4355   
4356   
4357   
4358   
4359   extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
4360        __attribute__ ((__nothrow__ , __leaf__));
4361   
4362   
4363   
4364   
4365   
4366   
4367   extern int usleep (__useconds_t __useconds);
4368   # 489 "/usr/include/unistd.h" 3 4
4369   extern int pause (void);
4370   
4371   
4372   
4373   extern int chown (const char *__file, __uid_t __owner, __gid_t __group)
4374        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
4375   
4376   
4377   
4378   extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
4379   
4380   
4381   
4382   
4383   extern int lchown (const char *__file, __uid_t __owner, __gid_t __group)
4384        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
4385   
4386   
4387   
4388   
4389   
4390   
4391   extern int fchownat (int __fd, const char *__file, __uid_t __owner,
4392          __gid_t __group, int __flag)
4393        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
4394   
4395   
4396   
4397   extern int chdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
4398   
4399   
4400   
4401   extern int fchdir (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
4402   # 531 "/usr/include/unistd.h" 3 4
4403   extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
4404   # 545 "/usr/include/unistd.h" 3 4
4405   extern char *getwd (char *__buf)
4406        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__))
4407       __attribute__ ((__access__ (__write_only__, 1)));
4408   
4409   
4410   
4411   
4412   extern int dup (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
4413   
4414   
4415   extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__ , __leaf__));
4416   # 564 "/usr/include/unistd.h" 3 4
4417   extern char **__environ;
4418   
4419   
4420   
4421   
4422   
4423   
4424   
4425   extern int execve (const char *__path, char *const __argv[],
4426        char *const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4427   
4428   
4429   
4430   
4431   extern int fexecve (int __fd, char *const __argv[], char *const __envp[])
4432        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
4433   
4434   
4435   
4436   
4437   extern int execv (const char *__path, char *const __argv[])
4438        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4439   
4440   
4441   
4442   extern int execle (const char *__path, const char *__arg, ...)
4443        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4444   
4445   
4446   
4447   extern int execl (const char *__path, const char *__arg, ...)
4448        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4449   
4450   
4451   
4452   extern int execvp (const char *__file, char *const __argv[])
4453        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4454   
4455   
4456   
4457   
4458   extern int execlp (const char *__file, const char *__arg, ...)
4459        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
4460   # 619 "/usr/include/unistd.h" 3 4
4461   extern int nice (int __inc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
4462   
4463   
4464   
4465   
4466   extern void _exit (int __status) __attribute__ ((__noreturn__));
4467   
4468   
4469   
4470   
4471   
4472   # 1 "/usr/include/x86_64-linux-gnu/bits/confname.h" 1 3 4
4473   # 24 "/usr/include/x86_64-linux-gnu/bits/confname.h" 3 4
4474   enum
4475     {
4476       _PC_LINK_MAX,
4477   
4478       _PC_MAX_CANON,
4479   
4480       _PC_MAX_INPUT,
4481   
4482       _PC_NAME_MAX,
4483   
4484       _PC_PATH_MAX,
4485   
4486       _PC_PIPE_BUF,
4487   
4488       _PC_CHOWN_RESTRICTED,
4489   
4490       _PC_NO_TRUNC,
4491   
4492       _PC_VDISABLE,
4493   
4494       _PC_SYNC_IO,
4495   
4496       _PC_ASYNC_IO,
4497   
4498       _PC_PRIO_IO,
4499   
4500       _PC_SOCK_MAXBUF,
4501   
4502       _PC_FILESIZEBITS,
4503   
4504       _PC_REC_INCR_XFER_SIZE,
4505   
4506       _PC_REC_MAX_XFER_SIZE,
4507   
4508       _PC_REC_MIN_XFER_SIZE,
4509   
4510       _PC_REC_XFER_ALIGN,
4511   
4512       _PC_ALLOC_SIZE_MIN,
4513   
4514       _PC_SYMLINK_MAX,
4515   
4516       _PC_2_SYMLINKS
4517   
4518     };
4519   
4520   
4521   enum
4522     {
4523       _SC_ARG_MAX,
4524   
4525       _SC_CHILD_MAX,
4526   
4527       _SC_CLK_TCK,
4528   
4529       _SC_NGROUPS_MAX,
4530   
4531       _SC_OPEN_MAX,
4532   
4533       _SC_STREAM_MAX,
4534   
4535       _SC_TZNAME_MAX,
4536   
4537       _SC_JOB_CONTROL,
4538   
4539       _SC_SAVED_IDS,
4540   
4541       _SC_REALTIME_SIGNALS,
4542   
4543       _SC_PRIORITY_SCHEDULING,
4544   
4545       _SC_TIMERS,
4546   
4547       _SC_ASYNCHRONOUS_IO,
4548   
4549       _SC_PRIORITIZED_IO,
4550   
4551       _SC_SYNCHRONIZED_IO,
4552   
4553       _SC_FSYNC,
4554   
4555       _SC_MAPPED_FILES,
4556   
4557       _SC_MEMLOCK,
4558   
4559       _SC_MEMLOCK_RANGE,
4560   
4561       _SC_MEMORY_PROTECTION,
4562   
4563       _SC_MESSAGE_PASSING,
4564   
4565       _SC_SEMAPHORES,
4566   
4567       _SC_SHARED_MEMORY_OBJECTS,
4568   
4569       _SC_AIO_LISTIO_MAX,
4570   
4571       _SC_AIO_MAX,
4572   
4573       _SC_AIO_PRIO_DELTA_MAX,
4574   
4575       _SC_DELAYTIMER_MAX,
4576   
4577       _SC_MQ_OPEN_MAX,
4578   
4579       _SC_MQ_PRIO_MAX,
4580   
4581       _SC_VERSION,
4582   
4583       _SC_PAGESIZE,
4584   
4585   
4586       _SC_RTSIG_MAX,
4587   
4588       _SC_SEM_NSEMS_MAX,
4589   
4590       _SC_SEM_VALUE_MAX,
4591   
4592       _SC_SIGQUEUE_MAX,
4593   
4594       _SC_TIMER_MAX,
4595   
4596   
4597   
4598   
4599       _SC_BC_BASE_MAX,
4600   
4601       _SC_BC_DIM_MAX,
4602   
4603       _SC_BC_SCALE_MAX,
4604   
4605       _SC_BC_STRING_MAX,
4606   
4607       _SC_COLL_WEIGHTS_MAX,
4608   
4609       _SC_EQUIV_CLASS_MAX,
4610   
4611       _SC_EXPR_NEST_MAX,
4612   
4613       _SC_LINE_MAX,
4614   
4615       _SC_RE_DUP_MAX,
4616   
4617       _SC_CHARCLASS_NAME_MAX,
4618   
4619   
4620       _SC_2_VERSION,
4621   
4622       _SC_2_C_BIND,
4623   
4624       _SC_2_C_DEV,
4625   
4626       _SC_2_FORT_DEV,
4627   
4628       _SC_2_FORT_RUN,
4629   
4630       _SC_2_SW_DEV,
4631   
4632       _SC_2_LOCALEDEF,
4633   
4634   
4635       _SC_PII,
4636   
4637       _SC_PII_XTI,
4638   
4639       _SC_PII_SOCKET,
4640   
4641       _SC_PII_INTERNET,
4642   
4643       _SC_PII_OSI,
4644   
4645       _SC_POLL,
4646   
4647       _SC_SELECT,
4648   
4649       _SC_UIO_MAXIOV,
4650   
4651       _SC_IOV_MAX = _SC_UIO_MAXIOV,
4652   
4653       _SC_PII_INTERNET_STREAM,
4654   
4655       _SC_PII_INTERNET_DGRAM,
4656   
4657       _SC_PII_OSI_COTS,
4658   
4659       _SC_PII_OSI_CLTS,
4660   
4661       _SC_PII_OSI_M,
4662   
4663       _SC_T_IOV_MAX,
4664   
4665   
4666   
4667       _SC_THREADS,
4668   
4669       _SC_THREAD_SAFE_FUNCTIONS,
4670   
4671       _SC_GETGR_R_SIZE_MAX,
4672   
4673       _SC_GETPW_R_SIZE_MAX,
4674   
4675       _SC_LOGIN_NAME_MAX,
4676   
4677       _SC_TTY_NAME_MAX,
4678   
4679       _SC_THREAD_DESTRUCTOR_ITERATIONS,
4680   
4681       _SC_THREAD_KEYS_MAX,
4682   
4683       _SC_THREAD_STACK_MIN,
4684   
4685       _SC_THREAD_THREADS_MAX,
4686   
4687       _SC_THREAD_ATTR_STACKADDR,
4688   
4689       _SC_THREAD_ATTR_STACKSIZE,
4690   
4691       _SC_THREAD_PRIORITY_SCHEDULING,
4692   
4693       _SC_THREAD_PRIO_INHERIT,
4694   
4695       _SC_THREAD_PRIO_PROTECT,
4696   
4697       _SC_THREAD_PROCESS_SHARED,
4698   
4699   
4700       _SC_NPROCESSORS_CONF,
4701   
4702       _SC_NPROCESSORS_ONLN,
4703   
4704       _SC_PHYS_PAGES,
4705   
4706       _SC_AVPHYS_PAGES,
4707   
4708       _SC_ATEXIT_MAX,
4709   
4710       _SC_PASS_MAX,
4711   
4712   
4713       _SC_XOPEN_VERSION,
4714   
4715       _SC_XOPEN_XCU_VERSION,
4716   
4717       _SC_XOPEN_UNIX,
4718   
4719       _SC_XOPEN_CRYPT,
4720   
4721       _SC_XOPEN_ENH_I18N,
4722   
4723       _SC_XOPEN_SHM,
4724   
4725   
4726       _SC_2_CHAR_TERM,
4727   
4728       _SC_2_C_VERSION,
4729   
4730       _SC_2_UPE,
4731   
4732   
4733       _SC_XOPEN_XPG2,
4734   
4735       _SC_XOPEN_XPG3,
4736   
4737       _SC_XOPEN_XPG4,
4738   
4739   
4740       _SC_CHAR_BIT,
4741   
4742       _SC_CHAR_MAX,
4743   
4744       _SC_CHAR_MIN,
4745   
4746       _SC_INT_MAX,
4747   
4748       _SC_INT_MIN,
4749   
4750       _SC_LONG_BIT,
4751   
4752       _SC_WORD_BIT,
4753   
4754       _SC_MB_LEN_MAX,
4755   
4756       _SC_NZERO,
4757   
4758       _SC_SSIZE_MAX,
4759   
4760       _SC_SCHAR_MAX,
4761   
4762       _SC_SCHAR_MIN,
4763   
4764       _SC_SHRT_MAX,
4765   
4766       _SC_SHRT_MIN,
4767   
4768       _SC_UCHAR_MAX,
4769   
4770       _SC_UINT_MAX,
4771   
4772       _SC_ULONG_MAX,
4773   
4774       _SC_USHRT_MAX,
4775   
4776   
4777       _SC_NL_ARGMAX,
4778   
4779       _SC_NL_LANGMAX,
4780   
4781       _SC_NL_MSGMAX,
4782   
4783       _SC_NL_NMAX,
4784   
4785       _SC_NL_SETMAX,
4786   
4787       _SC_NL_TEXTMAX,
4788   
4789   
4790       _SC_XBS5_ILP32_OFF32,
4791   
4792       _SC_XBS5_ILP32_OFFBIG,
4793   
4794       _SC_XBS5_LP64_OFF64,
4795   
4796       _SC_XBS5_LPBIG_OFFBIG,
4797   
4798   
4799       _SC_XOPEN_LEGACY,
4800   
4801       _SC_XOPEN_REALTIME,
4802   
4803       _SC_XOPEN_REALTIME_THREADS,
4804   
4805   
4806       _SC_ADVISORY_INFO,
4807   
4808       _SC_BARRIERS,
4809   
4810       _SC_BASE,
4811   
4812       _SC_C_LANG_SUPPORT,
4813   
4814       _SC_C_LANG_SUPPORT_R,
4815   
4816       _SC_CLOCK_SELECTION,
4817   
4818       _SC_CPUTIME,
4819   
4820       _SC_THREAD_CPUTIME,
4821   
4822       _SC_DEVICE_IO,
4823   
4824       _SC_DEVICE_SPECIFIC,
4825   
4826       _SC_DEVICE_SPECIFIC_R,
4827   
4828       _SC_FD_MGMT,
4829   
4830       _SC_FIFO,
4831   
4832       _SC_PIPE,
4833   
4834       _SC_FILE_ATTRIBUTES,
4835   
4836       _SC_FILE_LOCKING,
4837   
4838       _SC_FILE_SYSTEM,
4839   
4840       _SC_MONOTONIC_CLOCK,
4841   
4842       _SC_MULTI_PROCESS,
4843   
4844       _SC_SINGLE_PROCESS,
4845   
4846       _SC_NETWORKING,
4847   
4848       _SC_READER_WRITER_LOCKS,
4849   
4850       _SC_SPIN_LOCKS,
4851   
4852       _SC_REGEXP,
4853   
4854       _SC_REGEX_VERSION,
4855   
4856       _SC_SHELL,
4857   
4858       _SC_SIGNALS,
4859   
4860       _SC_SPAWN,
4861   
4862       _SC_SPORADIC_SERVER,
4863   
4864       _SC_THREAD_SPORADIC_SERVER,
4865   
4866       _SC_SYSTEM_DATABASE,
4867   
4868       _SC_SYSTEM_DATABASE_R,
4869   
4870       _SC_TIMEOUTS,
4871   
4872       _SC_TYPED_MEMORY_OBJECTS,
4873   
4874       _SC_USER_GROUPS,
4875   
4876       _SC_USER_GROUPS_R,
4877   
4878       _SC_2_PBS,
4879   
4880       _SC_2_PBS_ACCOUNTING,
4881   
4882       _SC_2_PBS_LOCATE,
4883   
4884       _SC_2_PBS_MESSAGE,
4885   
4886       _SC_2_PBS_TRACK,
4887   
4888       _SC_SYMLOOP_MAX,
4889   
4890       _SC_STREAMS,
4891   
4892       _SC_2_PBS_CHECKPOINT,
4893   
4894   
4895       _SC_V6_ILP32_OFF32,
4896   
4897       _SC_V6_ILP32_OFFBIG,
4898   
4899       _SC_V6_LP64_OFF64,
4900   
4901       _SC_V6_LPBIG_OFFBIG,
4902   
4903   
4904       _SC_HOST_NAME_MAX,
4905   
4906       _SC_TRACE,
4907   
4908       _SC_TRACE_EVENT_FILTER,
4909   
4910       _SC_TRACE_INHERIT,
4911   
4912       _SC_TRACE_LOG,
4913   
4914   
4915       _SC_LEVEL1_ICACHE_SIZE,
4916   
4917       _SC_LEVEL1_ICACHE_ASSOC,
4918   
4919       _SC_LEVEL1_ICACHE_LINESIZE,
4920   
4921       _SC_LEVEL1_DCACHE_SIZE,
4922   
4923       _SC_LEVEL1_DCACHE_ASSOC,
4924   
4925       _SC_LEVEL1_DCACHE_LINESIZE,
4926   
4927       _SC_LEVEL2_CACHE_SIZE,
4928   
4929       _SC_LEVEL2_CACHE_ASSOC,
4930   
4931       _SC_LEVEL2_CACHE_LINESIZE,
4932   
4933       _SC_LEVEL3_CACHE_SIZE,
4934   
4935       _SC_LEVEL3_CACHE_ASSOC,
4936   
4937       _SC_LEVEL3_CACHE_LINESIZE,
4938   
4939       _SC_LEVEL4_CACHE_SIZE,
4940   
4941       _SC_LEVEL4_CACHE_ASSOC,
4942   
4943       _SC_LEVEL4_CACHE_LINESIZE,
4944   
4945   
4946   
4947       _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
4948   
4949       _SC_RAW_SOCKETS,
4950   
4951   
4952       _SC_V7_ILP32_OFF32,
4953   
4954       _SC_V7_ILP32_OFFBIG,
4955   
4956       _SC_V7_LP64_OFF64,
4957   
4958       _SC_V7_LPBIG_OFFBIG,
4959   
4960   
4961       _SC_SS_REPL_MAX,
4962   
4963   
4964       _SC_TRACE_EVENT_NAME_MAX,
4965   
4966       _SC_TRACE_NAME_MAX,
4967   
4968       _SC_TRACE_SYS_MAX,
4969   
4970       _SC_TRACE_USER_EVENT_MAX,
4971   
4972   
4973       _SC_XOPEN_STREAMS,
4974   
4975   
4976       _SC_THREAD_ROBUST_PRIO_INHERIT,
4977   
4978       _SC_THREAD_ROBUST_PRIO_PROTECT,
4979   
4980   
4981       _SC_MINSIGSTKSZ,
4982   
4983   
4984       _SC_SIGSTKSZ
4985   
4986     };
4987   
4988   
4989   enum
4990     {
4991       _CS_PATH,
4992   
4993   
4994       _CS_V6_WIDTH_RESTRICTED_ENVS,
4995   
4996   
4997   
4998       _CS_GNU_LIBC_VERSION,
4999   
5000       _CS_GNU_LIBPTHREAD_VERSION,
5001   
5002   
5003       _CS_V5_WIDTH_RESTRICTED_ENVS,
5004   
5005   
5006   
5007       _CS_V7_WIDTH_RESTRICTED_ENVS,
5008   
5009   
5010   
5011       _CS_LFS_CFLAGS = 1000,
5012   
5013       _CS_LFS_LDFLAGS,
5014   
5015       _CS_LFS_LIBS,
5016   
5017       _CS_LFS_LINTFLAGS,
5018   
5019       _CS_LFS64_CFLAGS,
5020   
5021       _CS_LFS64_LDFLAGS,
5022   
5023       _CS_LFS64_LIBS,
5024   
5025       _CS_LFS64_LINTFLAGS,
5026   
5027   
5028       _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
5029   
5030       _CS_XBS5_ILP32_OFF32_LDFLAGS,
5031   
5032       _CS_XBS5_ILP32_OFF32_LIBS,
5033   
5034       _CS_XBS5_ILP32_OFF32_LINTFLAGS,
5035   
5036       _CS_XBS5_ILP32_OFFBIG_CFLAGS,
5037   
5038       _CS_XBS5_ILP32_OFFBIG_LDFLAGS,
5039   
5040       _CS_XBS5_ILP32_OFFBIG_LIBS,
5041   
5042       _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
5043   
5044       _CS_XBS5_LP64_OFF64_CFLAGS,
5045   
5046       _CS_XBS5_LP64_OFF64_LDFLAGS,
5047   
5048       _CS_XBS5_LP64_OFF64_LIBS,
5049   
5050       _CS_XBS5_LP64_OFF64_LINTFLAGS,
5051   
5052       _CS_XBS5_LPBIG_OFFBIG_CFLAGS,
5053   
5054       _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
5055   
5056       _CS_XBS5_LPBIG_OFFBIG_LIBS,
5057   
5058       _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
5059   
5060   
5061       _CS_POSIX_V6_ILP32_OFF32_CFLAGS,
5062   
5063       _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
5064   
5065       _CS_POSIX_V6_ILP32_OFF32_LIBS,
5066   
5067       _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
5068   
5069       _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
5070   
5071       _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
5072   
5073       _CS_POSIX_V6_ILP32_OFFBIG_LIBS,
5074   
5075       _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
5076   
5077       _CS_POSIX_V6_LP64_OFF64_CFLAGS,
5078   
5079       _CS_POSIX_V6_LP64_OFF64_LDFLAGS,
5080   
5081       _CS_POSIX_V6_LP64_OFF64_LIBS,
5082   
5083       _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
5084   
5085       _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
5086   
5087       _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
5088   
5089       _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
5090   
5091       _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS,
5092   
5093   
5094       _CS_POSIX_V7_ILP32_OFF32_CFLAGS,
5095   
5096       _CS_POSIX_V7_ILP32_OFF32_LDFLAGS,
5097   
5098       _CS_POSIX_V7_ILP32_OFF32_LIBS,
5099   
5100       _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS,
5101   
5102       _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS,
5103   
5104       _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS,
5105   
5106       _CS_POSIX_V7_ILP32_OFFBIG_LIBS,
5107   
5108       _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS,
5109   
5110       _CS_POSIX_V7_LP64_OFF64_CFLAGS,
5111   
5112       _CS_POSIX_V7_LP64_OFF64_LDFLAGS,
5113   
5114       _CS_POSIX_V7_LP64_OFF64_LIBS,
5115   
5116       _CS_POSIX_V7_LP64_OFF64_LINTFLAGS,
5117   
5118       _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS,
5119   
5120       _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS,
5121   
5122       _CS_POSIX_V7_LPBIG_OFFBIG_LIBS,
5123   
5124       _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS,
5125   
5126   
5127       _CS_V6_ENV,
5128   
5129       _CS_V7_ENV
5130   
5131     };
5132   # 631 "/usr/include/unistd.h" 2 3 4
5133   
5134   
5135   extern long int pathconf (const char *__path, int __name)
5136        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
5137   
5138   
5139   extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__ , __leaf__));
5140   
5141   
5142   extern long int sysconf (int __name) __attribute__ ((__nothrow__ , __leaf__));
5143   
5144   
5145   
5146   extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__))
5147       __attribute__ ((__access__ (__write_only__, 2, 3)));
5148   
5149   
5150   
5151   
5152   extern __pid_t getpid (void) __attribute__ ((__nothrow__ , __leaf__));
5153   
5154   
5155   extern __pid_t getppid (void) __attribute__ ((__nothrow__ , __leaf__));
5156   
5157   
5158   extern __pid_t getpgrp (void) __attribute__ ((__nothrow__ , __leaf__));
5159   
5160   
5161   extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
5162   
5163   extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
5164   
5165   
5166   
5167   
5168   
5169   
5170   extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__ , __leaf__));
5171   # 682 "/usr/include/unistd.h" 3 4
5172   extern int setpgrp (void) __attribute__ ((__nothrow__ , __leaf__));
5173   
5174   
5175   
5176   
5177   
5178   
5179   extern __pid_t setsid (void) __attribute__ ((__nothrow__ , __leaf__));
5180   
5181   
5182   
5183   extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
5184   
5185   
5186   
5187   extern __uid_t getuid (void) __attribute__ ((__nothrow__ , __leaf__));
5188   
5189   
5190   extern __uid_t geteuid (void) __attribute__ ((__nothrow__ , __leaf__));
5191   
5192   
5193   extern __gid_t getgid (void) __attribute__ ((__nothrow__ , __leaf__));
5194   
5195   
5196   extern __gid_t getegid (void) __attribute__ ((__nothrow__ , __leaf__));
5197   
5198   
5199   
5200   
5201   extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__))
5202       __attribute__ ((__access__ (__write_only__, 2, 1)));
5203   # 722 "/usr/include/unistd.h" 3 4
5204   extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5205   
5206   
5207   
5208   
5209   extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5210   
5211   
5212   
5213   
5214   extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5215   
5216   
5217   
5218   
5219   
5220   
5221   extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5222   
5223   
5224   
5225   
5226   extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5227   
5228   
5229   
5230   
5231   extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5232   # 778 "/usr/include/unistd.h" 3 4
5233   extern __pid_t fork (void) __attribute__ ((__nothrow__));
5234   
5235   
5236   
5237   
5238   
5239   
5240   
5241   extern __pid_t vfork (void) __attribute__ ((__nothrow__ , __leaf__));
5242   # 799 "/usr/include/unistd.h" 3 4
5243   extern char *ttyname (int __fd) __attribute__ ((__nothrow__ , __leaf__));
5244   
5245   
5246   
5247   extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
5248        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__))
5249        __attribute__ ((__access__ (__write_only__, 2, 3)));
5250   
5251   
5252   
5253   extern int isatty (int __fd) __attribute__ ((__nothrow__ , __leaf__));
5254   
5255   
5256   
5257   
5258   extern int ttyslot (void) __attribute__ ((__nothrow__ , __leaf__));
5259   
5260   
5261   
5262   
5263   extern int link (const char *__from, const char *__to)
5264        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
5265   
5266   
5267   
5268   
5269   extern int linkat (int __fromfd, const char *__from, int __tofd,
5270        const char *__to, int __flags)
5271        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__));
5272   
5273   
5274   
5275   
5276   extern int symlink (const char *__from, const char *__to)
5277        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
5278   
5279   
5280   
5281   
5282   extern ssize_t readlink (const char *__restrict __path,
5283       char *__restrict __buf, size_t __len)
5284        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__))
5285        __attribute__ ((__access__ (__write_only__, 2, 3)));
5286   
5287   
5288   
5289   
5290   
5291   extern int symlinkat (const char *__from, int __tofd,
5292           const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__));
5293   
5294   
5295   extern ssize_t readlinkat (int __fd, const char *__restrict __path,
5296         char *__restrict __buf, size_t __len)
5297        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__))
5298        __attribute__ ((__access__ (__write_only__, 3, 4)));
5299   
5300   
5301   
5302   extern int unlink (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
5303   
5304   
5305   
5306   extern int unlinkat (int __fd, const char *__name, int __flag)
5307        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
5308   
5309   
5310   
5311   extern int rmdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
5312   
5313   
5314   
5315   extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__ , __leaf__));
5316   
5317   
5318   extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__ , __leaf__));
5319   
5320   
5321   
5322   
5323   
5324   
5325   extern char *getlogin (void);
5326   
5327   
5328   
5329   
5330   
5331   
5332   
5333   extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)))
5334       __attribute__ ((__access__ (__write_only__, 1, 2)));
5335   
5336   
5337   
5338   
5339   extern int setlogin (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
5340   
5341   
5342   
5343   
5344   
5345   
5346   
5347   # 1 "/usr/include/x86_64-linux-gnu/bits/getopt_posix.h" 1 3 4
5348   # 27 "/usr/include/x86_64-linux-gnu/bits/getopt_posix.h" 3 4
5349   # 1 "/usr/include/x86_64-linux-gnu/bits/getopt_core.h" 1 3 4
5350   # 28 "/usr/include/x86_64-linux-gnu/bits/getopt_core.h" 3 4
5351   
5352   
5353   
5354   
5355   
5356   
5357   
5358   
5359   extern char *optarg;
5360   # 50 "/usr/include/x86_64-linux-gnu/bits/getopt_core.h" 3 4
5361   extern int optind;
5362   
5363   
5364   
5365   
5366   extern int opterr;
5367   
5368   
5369   
5370   extern int optopt;
5371   # 91 "/usr/include/x86_64-linux-gnu/bits/getopt_core.h" 3 4
5372   extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
5373          __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
5374   
5375   
5376   # 28 "/usr/include/x86_64-linux-gnu/bits/getopt_posix.h" 2 3 4
5377   
5378   
5379   # 49 "/usr/include/x86_64-linux-gnu/bits/getopt_posix.h" 3 4
5380   
5381   # 904 "/usr/include/unistd.h" 2 3 4
5382   
5383   
5384   
5385   
5386   
5387   
5388   
5389   extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)))
5390       __attribute__ ((__access__ (__write_only__, 1, 2)));
5391   
5392   
5393   
5394   
5395   
5396   
5397   extern int sethostname (const char *__name, size_t __len)
5398        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 1, 2)));
5399   
5400   
5401   
5402   extern int sethostid (long int __id) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5403   
5404   
5405   
5406   
5407   
5408   extern int getdomainname (char *__name, size_t __len)
5409        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__))
5410        __attribute__ ((__access__ (__write_only__, 1, 2)));
5411   extern int setdomainname (const char *__name, size_t __len)
5412        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__read_only__, 1, 2)));
5413   
5414   
5415   
5416   
5417   extern int vhangup (void) __attribute__ ((__nothrow__ , __leaf__));
5418   
5419   
5420   extern int revoke (const char *__file) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
5421   
5422   
5423   
5424   
5425   
5426   
5427   
5428   extern int profil (unsigned short int *__sample_buffer, size_t __size,
5429        size_t __offset, unsigned int __scale)
5430        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
5431   
5432   
5433   
5434   
5435   
5436   extern int acct (const char *__name) __attribute__ ((__nothrow__ , __leaf__));
5437   
5438   
5439   
5440   extern char *getusershell (void) __attribute__ ((__nothrow__ , __leaf__));
5441   extern void endusershell (void) __attribute__ ((__nothrow__ , __leaf__));
5442   extern void setusershell (void) __attribute__ ((__nothrow__ , __leaf__));
5443   
5444   
5445   
5446   
5447   
5448   extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5449   
5450   
5451   
5452   
5453   
5454   
5455   extern int chroot (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
5456   
5457   
5458   
5459   extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1)));
5460   
5461   
5462   
5463   
5464   
5465   
5466   
5467   extern int fsync (int __fd);
5468   # 1002 "/usr/include/unistd.h" 3 4
5469   extern long int gethostid (void);
5470   
5471   
5472   extern void sync (void) __attribute__ ((__nothrow__ , __leaf__));
5473   
5474   
5475   
5476   
5477   
5478   extern int getpagesize (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
5479   
5480   
5481   
5482   
5483   extern int getdtablesize (void) __attribute__ ((__nothrow__ , __leaf__));
5484   # 1026 "/usr/include/unistd.h" 3 4
5485   extern int truncate (const char *__file, __off_t __length)
5486        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
5487   # 1049 "/usr/include/unistd.h" 3 4
5488   extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5489   # 1070 "/usr/include/unistd.h" 3 4
5490   extern int brk (void *__addr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5491   
5492   
5493   
5494   
5495   
5496   extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ , __leaf__));
5497   # 1091 "/usr/include/unistd.h" 3 4
5498   extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ , __leaf__));
5499   # 1114 "/usr/include/unistd.h" 3 4
5500   extern int lockf (int __fd, int __cmd, __off_t __len) __attribute__ ((__warn_unused_result__));
5501   # 1150 "/usr/include/unistd.h" 3 4
5502   extern int fdatasync (int __fildes);
5503   # 1159 "/usr/include/unistd.h" 3 4
5504   extern char *crypt (const char *__key, const char *__salt)
5505        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
5506   # 1198 "/usr/include/unistd.h" 3 4
5507   int getentropy (void *__buffer, size_t __length) __attribute__ ((__warn_unused_result__))
5508       __attribute__ ((__access__ (__write_only__, 1, 2)));
5509   # 1214 "/usr/include/unistd.h" 3 4
5510   # 1 "/usr/include/x86_64-linux-gnu/bits/unistd.h" 1 3 4
5511   # 23 "/usr/include/x86_64-linux-gnu/bits/unistd.h" 3 4
5512   extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes,
5513         size_t __buflen)
5514     __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
5515   extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read")
5516   
5517     __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
5518   extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk")
5519   
5520   
5521        __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer")))
5522                                     ;
5523   
5524   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
5525   read (int __fd, void *__buf, size_t __nbytes)
5526   {
5527     return ((((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) && (((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) ? __read_alias (__fd, __buf, __nbytes) : ((((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) && !(((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) ? __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)) : __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0))))
5528   
5529                              ;
5530   }
5531   
5532   
5533   extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes,
5534          __off_t __offset, size_t __bufsize)
5535     __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
5536   extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes,
5537            __off64_t __offset, size_t __bufsize)
5538     __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
5539   extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread")
5540   
5541   
5542     __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
5543   extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64")
5544   
5545   
5546     __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
5547   extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk")
5548   
5549   
5550        __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer")))
5551                                     ;
5552   extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk")
5553   
5554   
5555   
5556        __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer")))
5557                                     ;
5558   
5559   
5560   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
5561   pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset)
5562   {
5563     return ((((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) && (((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) ? __pread_alias (__fd, __buf, __nbytes, __offset) : ((((__typeof (__nbytes)) 0 < (__typeof (__nbytes)) -1 || (__builtin_constant_p (__nbytes) && (__nbytes) > 0)) && __builtin_constant_p ((((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) && !(((long unsigned int) (__nbytes)) <= (__builtin_object_size (__buf, 0)) / (sizeof (char)))) ? __pread_chk_warn (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)) : __pread_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0))))
5564   
5565                                        ;
5566   }
5567   # 100 "/usr/include/x86_64-linux-gnu/bits/unistd.h" 3 4
5568   extern ssize_t __readlink_chk (const char *__restrict __path,
5569             char *__restrict __buf, size_t __len,
5570             size_t __buflen)
5571        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
5572   extern ssize_t __readlink_alias (const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlink") __attribute__ ((__nothrow__ , __leaf__))
5573   
5574   
5575        __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 3)));
5576   extern ssize_t __readlink_chk_warn (const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlink_chk") __attribute__ ((__nothrow__ , __leaf__))
5577   
5578   
5579   
5580        __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer")))
5581                                            ;
5582   
5583   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t
5584   __attribute__ ((__nothrow__ , __leaf__)) readlink (const char *__restrict __path, char *__restrict __buf, size_t __len)
5585   
5586   {
5587     return ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __readlink_alias (__path, __buf, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)) : __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1))))
5588   
5589                             ;
5590   }
5591   
5592   
5593   
5594   extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path,
5595        char *__restrict __buf, size_t __len,
5596        size_t __buflen)
5597        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 3, 4)));
5598   extern ssize_t __readlinkat_alias (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlinkat") __attribute__ ((__nothrow__ , __leaf__))
5599   
5600   
5601   
5602        __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 3, 4)));
5603   extern ssize_t __readlinkat_chk_warn (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlinkat_chk") __attribute__ ((__nothrow__ , __leaf__))
5604   
5605   
5606   
5607        __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer")))
5608   
5609                   ;
5610   
5611   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t
5612   __attribute__ ((__nothrow__ , __leaf__)) readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len)
5613   
5614   {
5615     return ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __readlinkat_alias (__fd, __path, __buf, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __readlinkat_chk_warn (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1)) : __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1))))
5616   
5617                                   ;
5618   }
5619   
5620   
5621   extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen)
5622        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
5623   extern char *__getcwd_alias (char *__buf, size_t __size) __asm__ ("" "getcwd") __attribute__ ((__nothrow__ , __leaf__))
5624                                                 __attribute__ ((__warn_unused_result__));
5625   extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) __asm__ ("" "__getcwd_chk") __attribute__ ((__nothrow__ , __leaf__))
5626   
5627   
5628        __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer")))
5629                                 ;
5630   
5631   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
5632   __attribute__ ((__nothrow__ , __leaf__)) getcwd (char *__buf, size_t __size)
5633   {
5634     return ((((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__size)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __getcwd_alias (__buf, __size) : ((((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__size)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1)) : __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1))))
5635   
5636                      ;
5637   }
5638   
5639   
5640   extern char *__getwd_chk (char *__buf, size_t buflen)
5641        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
5642   extern char *__getwd_warn (char *__buf) __asm__ ("" "getwd") __attribute__ ((__nothrow__ , __leaf__))
5643        __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size")))
5644                                            ;
5645   
5646   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char *
5647   __attribute__ ((__nothrow__ , __leaf__)) getwd (char *__buf)
5648   {
5649     if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
5650       return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1));
5651     return __getwd_warn (__buf);
5652   }
5653   
5654   
5655   extern size_t __confstr_chk (int __name, char *__buf, size_t __len,
5656           size_t __buflen) __attribute__ ((__nothrow__ , __leaf__))
5657     __attribute__ ((__access__ (__write_only__, 2, 3)));
5658   extern size_t __confstr_alias (int __name, char *__buf, size_t __len) __asm__ ("" "confstr") __attribute__ ((__nothrow__ , __leaf__))
5659   
5660      __attribute__ ((__access__ (__write_only__, 2, 3)));
5661   extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) __asm__ ("" "__confstr_chk") __attribute__ ((__nothrow__ , __leaf__))
5662   
5663   
5664        __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer")))
5665               ;
5666   
5667   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
5668   __attribute__ ((__nothrow__ , __leaf__)) confstr (int __name, char *__buf, size_t __len)
5669   {
5670     return ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __confstr_alias (__name, __buf, __len) : ((((__typeof (__len)) 0 < (__typeof (__len)) -1 || (__builtin_constant_p (__len) && (__len) > 0)) && __builtin_constant_p ((((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__len)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)) : __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1))))
5671   
5672                             ;
5673   }
5674   
5675   
5676   extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen)
5677     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 1)));
5678   extern int __getgroups_alias (int __size, __gid_t __list[]) __asm__ ("" "getgroups") __attribute__ ((__nothrow__ , __leaf__))
5679                    __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 2, 1)));
5680   extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) __asm__ ("" "__getgroups_chk") __attribute__ ((__nothrow__ , __leaf__))
5681   
5682   
5683        __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer")))
5684                                              ;
5685   
5686   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
5687   __attribute__ ((__nothrow__ , __leaf__)) getgroups (int __size, __gid_t __list[])
5688   {
5689     return ((((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= (__builtin_object_size (__list, 2 > 1)) / (sizeof (__gid_t)))) && (((long unsigned int) (__size)) <= (__builtin_object_size (__list, 2 > 1)) / (sizeof (__gid_t)))) ? __getgroups_alias (__size, __list) : ((((__typeof (__size)) 0 < (__typeof (__size)) -1 || (__builtin_constant_p (__size) && (__size) > 0)) && __builtin_constant_p ((((long unsigned int) (__size)) <= (__builtin_object_size (__list, 2 > 1)) / (sizeof (__gid_t)))) && !(((long unsigned int) (__size)) <= (__builtin_object_size (__list, 2 > 1)) / (sizeof (__gid_t)))) ? __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1)) : __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1))))
5690   
5691                       ;
5692   }
5693   
5694   
5695   extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen,
5696          size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)))
5697      __attribute__ ((__access__ (__write_only__, 2, 3)));
5698   extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ttyname_r") __attribute__ ((__nothrow__ , __leaf__))
5699   
5700        __attribute__ ((__nonnull__ (2)));
5701   extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ttyname_r_chk") __attribute__ ((__nothrow__ , __leaf__))
5702   
5703   
5704        __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer")))
5705                                     ;
5706   
5707   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
5708   __attribute__ ((__nothrow__ , __leaf__)) ttyname_r (int __fd, char *__buf, size_t __buflen)
5709   {
5710     return ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __ttyname_r_alias (__fd, __buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)) : __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1))))
5711   
5712                              ;
5713   }
5714   
5715   
5716   
5717   extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal)
5718        __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2)));
5719   extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r")
5720                        __attribute__ ((__nonnull__ (1)));
5721   extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk")
5722   
5723   
5724        __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer")))
5725                                     ;
5726   
5727   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
5728   getlogin_r (char *__buf, size_t __buflen)
5729   {
5730     return ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __getlogin_r_alias (__buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)) : __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1))))
5731   
5732                        ;
5733   }
5734   
5735   
5736   
5737   
5738   extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal)
5739        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2)));
5740   extern int __gethostname_alias (char *__buf, size_t __buflen) __asm__ ("" "gethostname") __attribute__ ((__nothrow__ , __leaf__))
5741   
5742     __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2)));
5743   extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__gethostname_chk") __attribute__ ((__nothrow__ , __leaf__))
5744   
5745   
5746        __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer")))
5747                                     ;
5748   
5749   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
5750   __attribute__ ((__nothrow__ , __leaf__)) gethostname (char *__buf, size_t __buflen)
5751   {
5752     return ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __gethostname_alias (__buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)) : __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1))))
5753   
5754                        ;
5755   }
5756   
5757   
5758   
5759   
5760   extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal)
5761        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
5762   extern int __getdomainname_alias (char *__buf, size_t __buflen) __asm__ ("" "getdomainname") __attribute__ ((__nothrow__ , __leaf__))
5763   
5764                        __attribute__ ((__nonnull__ (1)))
5765     __attribute__ ((__warn_unused_result__)) __attribute__ ((__access__ (__write_only__, 1, 2)));
5766   extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getdomainname_chk") __attribute__ ((__nothrow__ , __leaf__))
5767   
5768   
5769        __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer")))
5770   
5771                       ;
5772   
5773   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
5774   __attribute__ ((__nothrow__ , __leaf__)) getdomainname (char *__buf, size_t __buflen)
5775   {
5776     return ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && (((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __getdomainname_alias (__buf, __buflen) : ((((__typeof (__buflen)) 0 < (__typeof (__buflen)) -1 || (__builtin_constant_p (__buflen) && (__buflen) > 0)) && __builtin_constant_p ((((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) && !(((long unsigned int) (__buflen)) <= (__builtin_object_size (__buf, 2 > 1)) / (sizeof (char)))) ? __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)) : __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1))))
5777   
5778                        ;
5779   }
5780   # 1215 "/usr/include/unistd.h" 2 3 4
5781   
5782   
5783   
5784   # 1 "/usr/include/x86_64-linux-gnu/bits/unistd_ext.h" 1 3 4
5785   # 1219 "/usr/include/unistd.h" 2 3 4
5786   
5787   
5788   # 237 "include/internal/e_os.h" 2
5789   # 264 "include/internal/e_os.h"
5790   # 1 "/usr/include/strings.h" 1 3 4
5791   # 23 "/usr/include/strings.h" 3 4
5792   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 1 3 4
5793   # 24 "/usr/include/strings.h" 2 3 4
5794   
5795   
5796   
5797   
5798   
5799   
5800   
5801   
5802   
5803   
5804   extern int bcmp (const void *__s1, const void *__s2, size_t __n)
5805        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
5806   
5807   
5808   extern void bcopy (const void *__src, void *__dest, size_t __n)
5809     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
5810   
5811   
5812   extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
5813   # 68 "/usr/include/strings.h" 3 4
5814   extern char *index (const char *__s, int __c)
5815        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
5816   # 96 "/usr/include/strings.h" 3 4
5817   extern char *rindex (const char *__s, int __c)
5818        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
5819   
5820   
5821   
5822   
5823   
5824   
5825   extern int ffs (int __i) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
5826   
5827   
5828   
5829   
5830   
5831   extern int ffsl (long int __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
5832   __extension__ extern int ffsll (long long int __ll)
5833        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
5834   
5835   
5836   
5837   extern int strcasecmp (const char *__s1, const char *__s2)
5838        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
5839   
5840   
5841   extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
5842        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
5843   
5844   
5845   
5846   
5847   
5848   
5849   extern int strcasecmp_l (const char *__s1, const char *__s2, locale_t __loc)
5850        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
5851   
5852   
5853   
5854   extern int strncasecmp_l (const char *__s1, const char *__s2,
5855        size_t __n, locale_t __loc)
5856        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
5857   
5858   
5859   
5860   
5861   
5862   
5863   
5864   
5865   # 1 "/usr/include/x86_64-linux-gnu/bits/strings_fortified.h" 1 3 4
5866   # 22 "/usr/include/x86_64-linux-gnu/bits/strings_fortified.h" 3 4
5867   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
5868   __attribute__ ((__nothrow__ , __leaf__)) bcopy (const void *__src, void *__dest, size_t __len)
5869   {
5870     (void) __builtin___memmove_chk (__dest, __src, __len,
5871         __builtin_object_size (__dest, 0));
5872   }
5873   
5874   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
5875   __attribute__ ((__nothrow__ , __leaf__)) bzero (void *__dest, size_t __len)
5876   {
5877     (void) __builtin___memset_chk (__dest, '\0', __len,
5878        __builtin_object_size (__dest, 0));
5879   }
5880   # 145 "/usr/include/strings.h" 2 3 4
5881   # 265 "include/internal/e_os.h" 2
5882   # 16 "ssl/ssl_local.h" 2
5883   
5884   
5885   # 1 "/usr/include/errno.h" 1 3 4
5886   # 28 "/usr/include/errno.h" 3 4
5887   # 1 "/usr/include/x86_64-linux-gnu/bits/errno.h" 1 3 4
5888   # 26 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4
5889   # 1 "/usr/include/linux/errno.h" 1 3 4
5890   # 1 "/usr/include/x86_64-linux-gnu/asm/errno.h" 1 3 4
5891   # 1 "/usr/include/asm-generic/errno.h" 1 3 4
5892   
5893   
5894   
5895   
5896   # 1 "/usr/include/asm-generic/errno-base.h" 1 3 4
5897   # 6 "/usr/include/asm-generic/errno.h" 2 3 4
5898   # 2 "/usr/include/x86_64-linux-gnu/asm/errno.h" 2 3 4
5899   # 2 "/usr/include/linux/errno.h" 2 3 4
5900   # 27 "/usr/include/x86_64-linux-gnu/bits/errno.h" 2 3 4
5901   # 29 "/usr/include/errno.h" 2 3 4
5902   
5903   
5904   
5905   
5906   
5907   
5908   
5909   
5910   extern int *__errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
5911   # 52 "/usr/include/errno.h" 3 4
5912   
5913   # 19 "ssl/ssl_local.h" 2
5914   # 1 "include/internal/common.h" 1
5915   # 12 "include/internal/common.h"
5916           
5917   
5918   
5919   # 1 "/usr/include/string.h" 1 3 4
5920   # 26 "/usr/include/string.h" 3 4
5921   # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4
5922   # 27 "/usr/include/string.h" 2 3 4
5923   
5924   
5925   
5926   
5927   
5928   
5929   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 1 3 4
5930   # 34 "/usr/include/string.h" 2 3 4
5931   # 43 "/usr/include/string.h" 3 4
5932   extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
5933          size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
5934   
5935   
5936   extern void *memmove (void *__dest, const void *__src, size_t __n)
5937        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
5938   
5939   
5940   
5941   
5942   
5943   extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
5944           int __c, size_t __n)
5945       __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__access__ (__write_only__, 1, 4)));
5946   
5947   
5948   
5949   
5950   extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
5951   
5952   
5953   extern int memcmp (const void *__s1, const void *__s2, size_t __n)
5954        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
5955   # 80 "/usr/include/string.h" 3 4
5956   extern int __memcmpeq (const void *__s1, const void *__s2, size_t __n)
5957        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
5958   # 107 "/usr/include/string.h" 3 4
5959   extern void *memchr (const void *__s, int __c, size_t __n)
5960         __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
5961   # 141 "/usr/include/string.h" 3 4
5962   extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
5963        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
5964   
5965   extern char *strncpy (char *__restrict __dest,
5966           const char *__restrict __src, size_t __n)
5967        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
5968   
5969   
5970   extern char *strcat (char *__restrict __dest, const char *__restrict __src)
5971        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
5972   
5973   extern char *strncat (char *__restrict __dest, const char *__restrict __src,
5974           size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
5975   
5976   
5977   extern int strcmp (const char *__s1, const char *__s2)
5978        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
5979   
5980   extern int strncmp (const char *__s1, const char *__s2, size_t __n)
5981        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
5982   
5983   
5984   extern int strcoll (const char *__s1, const char *__s2)
5985        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
5986   
5987   extern size_t strxfrm (char *__restrict __dest,
5988            const char *__restrict __src, size_t __n)
5989       __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 1, 3)));
5990   
5991   
5992   
5993   
5994   
5995   
5996   extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l)
5997        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
5998   
5999   
6000   extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
6001       locale_t __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)))
6002        __attribute__ ((__access__ (__write_only__, 1, 3)));
6003   
6004   
6005   
6006   
6007   
6008   extern char *strdup (const char *__s)
6009        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
6010   
6011   
6012   
6013   
6014   
6015   
6016   extern char *strndup (const char *__string, size_t __n)
6017        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
6018   # 246 "/usr/include/string.h" 3 4
6019   extern char *strchr (const char *__s, int __c)
6020        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
6021   # 273 "/usr/include/string.h" 3 4
6022   extern char *strrchr (const char *__s, int __c)
6023        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
6024   # 293 "/usr/include/string.h" 3 4
6025   extern size_t strcspn (const char *__s, const char *__reject)
6026        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
6027   
6028   
6029   extern size_t strspn (const char *__s, const char *__accept)
6030        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
6031   # 323 "/usr/include/string.h" 3 4
6032   extern char *strpbrk (const char *__s, const char *__accept)
6033        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
6034   # 350 "/usr/include/string.h" 3 4
6035   extern char *strstr (const char *__haystack, const char *__needle)
6036        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
6037   
6038   
6039   
6040   
6041   extern char *strtok (char *__restrict __s, const char *__restrict __delim)
6042        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
6043   
6044   
6045   
6046   extern char *__strtok_r (char *__restrict __s,
6047       const char *__restrict __delim,
6048       char **__restrict __save_ptr)
6049        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
6050   
6051   extern char *strtok_r (char *__restrict __s, const char *__restrict __delim,
6052            char **__restrict __save_ptr)
6053        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
6054   # 407 "/usr/include/string.h" 3 4
6055   extern size_t strlen (const char *__s)
6056        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
6057   
6058   
6059   
6060   
6061   extern size_t strnlen (const char *__string, size_t __maxlen)
6062        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
6063   
6064   
6065   
6066   
6067   extern char *strerror (int __errnum) __attribute__ ((__nothrow__ , __leaf__));
6068   # 432 "/usr/include/string.h" 3 4
6069   extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__ , __leaf__))
6070   
6071                           __attribute__ ((__nonnull__ (2)))
6072       __attribute__ ((__access__ (__write_only__, 2, 3)));
6073   # 458 "/usr/include/string.h" 3 4
6074   extern char *strerror_l (int __errnum, locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
6075   
6076   
6077   
6078   
6079   
6080   
6081   
6082   extern void explicit_bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)))
6083       __attribute__ ((__access__ (__write_only__, 1, 2)));
6084   
6085   
6086   
6087   extern char *strsep (char **__restrict __stringp,
6088          const char *__restrict __delim)
6089        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
6090   
6091   
6092   
6093   
6094   extern char *strsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__));
6095   # 489 "/usr/include/string.h" 3 4
6096   extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)
6097        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
6098   extern char *stpcpy (char *__restrict __dest, const char *__restrict __src)
6099        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
6100   
6101   
6102   
6103   extern char *__stpncpy (char *__restrict __dest,
6104      const char *__restrict __src, size_t __n)
6105        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
6106   extern char *stpncpy (char *__restrict __dest,
6107           const char *__restrict __src, size_t __n)
6108        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
6109   # 535 "/usr/include/string.h" 3 4
6110   # 1 "/usr/include/x86_64-linux-gnu/bits/string_fortified.h" 1 3 4
6111   # 25 "/usr/include/x86_64-linux-gnu/bits/string_fortified.h" 3 4
6112   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
6113   __attribute__ ((__nothrow__ , __leaf__)) memcpy (void *__restrict __dest, const void *__restrict __src, size_t __len)
6114   
6115   {
6116     return __builtin___memcpy_chk (__dest, __src, __len,
6117        __builtin_object_size (__dest, 0));
6118   }
6119   
6120   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
6121   __attribute__ ((__nothrow__ , __leaf__)) memmove (void *__dest, const void *__src, size_t __len)
6122   {
6123     return __builtin___memmove_chk (__dest, __src, __len,
6124         __builtin_object_size (__dest, 0));
6125   }
6126   # 56 "/usr/include/x86_64-linux-gnu/bits/string_fortified.h" 3 4
6127   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
6128   __attribute__ ((__nothrow__ , __leaf__)) memset (void *__dest, int __ch, size_t __len)
6129   {
6130     return __builtin___memset_chk (__dest, __ch, __len,
6131        __builtin_object_size (__dest, 0));
6132   }
6133   
6134   
6135   
6136   
6137   void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
6138     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__access__ (__write_only__, 1, 2)));
6139   
6140   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
6141   __attribute__ ((__nothrow__ , __leaf__)) explicit_bzero (void *__dest, size_t __len)
6142   {
6143     __explicit_bzero_chk (__dest, __len, __builtin_object_size (__dest, 0));
6144   }
6145   
6146   
6147   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
6148   __attribute__ ((__nothrow__ , __leaf__)) strcpy (char *__restrict __dest, const char *__restrict __src)
6149   {
6150     return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
6151   }
6152   
6153   
6154   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
6155   __attribute__ ((__nothrow__ , __leaf__)) stpcpy (char *__restrict __dest, const char *__restrict __src)
6156   {
6157     return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
6158   }
6159   
6160   
6161   
6162   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
6163   __attribute__ ((__nothrow__ , __leaf__)) strncpy (char *__restrict __dest, const char *__restrict __src, size_t __len)
6164   
6165   {
6166     return __builtin___strncpy_chk (__dest, __src, __len,
6167         __builtin_object_size (__dest, 2 > 1));
6168   }
6169   
6170   
6171   
6172   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
6173   __attribute__ ((__nothrow__ , __leaf__)) stpncpy (char *__dest, const char *__src, size_t __n)
6174   {
6175     return __builtin___stpncpy_chk (__dest, __src, __n,
6176         __builtin_object_size (__dest, 2 > 1));
6177   }
6178   # 127 "/usr/include/x86_64-linux-gnu/bits/string_fortified.h" 3 4
6179   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
6180   __attribute__ ((__nothrow__ , __leaf__)) strcat (char *__restrict __dest, const char *__restrict __src)
6181   {
6182     return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
6183   }
6184   
6185   
6186   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
6187   __attribute__ ((__nothrow__ , __leaf__)) strncat (char *__restrict __dest, const char *__restrict __src, size_t __len)
6188   
6189   {
6190     return __builtin___strncat_chk (__dest, __src, __len,
6191         __builtin_object_size (__dest, 2 > 1));
6192   }
6193   # 536 "/usr/include/string.h" 2 3 4
6194   
6195   
6196   
6197   
6198   # 16 "include/internal/common.h" 2
6199   
6200   
6201   
6202   # 1 "include/internal/nelem.h" 1
6203   # 12 "include/internal/nelem.h"
6204           
6205   # 20 "include/internal/common.h" 2
6206   # 187 "include/internal/common.h"
6207   
6208   # 187 "include/internal/common.h"
6209   static inline int ossl_ends_with_dirsep(const char *path)
6210   {
6211       if (*path != '\0')
6212           path += strlen(path) - 1;
6213   
6214   
6215   
6216   
6217   
6218   
6219   
6220       return *path == '/';
6221   }
6222   
6223   static inline char ossl_determine_dirsep(const char *path)
6224   {
6225       if (ossl_ends_with_dirsep(path))
6226           return '\0';
6227   
6228   
6229   
6230   
6231   
6232   
6233       return '/';
6234   
6235   }
6236   
6237   static inline int ossl_is_absolute_path(const char *path)
6238   {
6239   # 228 "include/internal/common.h"
6240       return path[0] == '/';
6241   }
6242   # 20 "ssl/ssl_local.h" 2
6243   
6244   # 1 "include/openssl/buffer.h" 1
6245   # 12 "include/openssl/buffer.h"
6246           
6247   
6248   
6249   
6250   
6251   
6252   
6253   # 1 "include/openssl/types.h" 1
6254   # 20 "include/openssl/buffer.h" 2
6255   
6256   
6257   
6258   # 1 "include/openssl/buffererr.h" 1
6259   # 13 "include/openssl/buffererr.h"
6260           
6261   # 24 "include/openssl/buffer.h" 2
6262   
6263   
6264   
6265   
6266   
6267   
6268   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 1 3 4
6269   # 31 "include/openssl/buffer.h" 2
6270   # 42 "include/openssl/buffer.h"
6271   struct buf_mem_st {
6272       size_t length;
6273       char *data;
6274       size_t max;
6275       unsigned long flags;
6276   };
6277   
6278   
6279   
6280   BUF_MEM *BUF_MEM_new(void);
6281   BUF_MEM *BUF_MEM_new_ex(unsigned long flags);
6282   void BUF_MEM_free(BUF_MEM *a);
6283   size_t BUF_MEM_grow(BUF_MEM *str, size_t len);
6284   size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
6285   void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz);
6286   # 22 "ssl/ssl_local.h" 2
6287   # 1 "include/openssl/bio.h" 1
6288   # 16 "include/openssl/bio.h"
6289           
6290   # 28 "include/openssl/bio.h"
6291   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h" 1 3 4
6292   # 29 "include/openssl/bio.h" 2
6293   
6294   
6295   # 1 "include/openssl/bioerr.h" 1
6296   # 13 "include/openssl/bioerr.h"
6297           
6298   # 32 "include/openssl/bio.h" 2
6299   # 242 "include/openssl/bio.h"
6300   typedef union bio_addr_st BIO_ADDR;
6301   typedef struct bio_addrinfo_st BIO_ADDRINFO;
6302   
6303   int BIO_get_new_index(void);
6304   void BIO_set_flags(BIO *b, int flags);
6305   int BIO_test_flags(const BIO *b, int flags);
6306   void BIO_clear_flags(BIO *b, int flags);
6307   # 307 "include/openssl/bio.h"
6308   typedef long (*BIO_callback_fn)(BIO *b, int oper, const char *argp, int argi,
6309                                   long argl, long ret);
6310   __attribute__((deprecated("Since OpenSSL " "3.0"))) BIO_callback_fn BIO_get_callback(const BIO *b);
6311   __attribute__((deprecated("Since OpenSSL " "3.0"))) void BIO_set_callback(BIO *b, BIO_callback_fn callback);
6312   __attribute__((deprecated("Since OpenSSL " "3.0"))) long BIO_debug_callback(BIO *bio, int cmd,
6313                                                  const char *argp, int argi,
6314                                                  long argl, long ret);
6315   
6316   
6317   typedef long (*BIO_callback_fn_ex)(BIO *b, int oper, const char *argp,
6318                                      size_t len, int argi,
6319                                      long argl, int ret, size_t *processed);
6320   BIO_callback_fn_ex BIO_get_callback_ex(const BIO *b);
6321   void BIO_set_callback_ex(BIO *b, BIO_callback_fn_ex callback);
6322   long BIO_debug_callback_ex(BIO *bio, int oper, const char *argp, size_t len,
6323                              int argi, long argl, int ret, size_t *processed);
6324   
6325   char *BIO_get_callback_arg(const BIO *b);
6326   void BIO_set_callback_arg(BIO *b, char *arg);
6327   
6328   typedef struct bio_method_st BIO_METHOD;
6329   
6330   const char *BIO_method_name(const BIO *b);
6331   int BIO_method_type(const BIO *b);
6332   
6333   typedef int BIO_info_cb(BIO *, int, int);
6334   typedef BIO_info_cb bio_info_cb;
6335   
6336   struct stack_st_BIO; typedef int (*sk_BIO_compfunc)(const BIO * const *a, const BIO *const *b); typedef void (*sk_BIO_freefunc)(BIO *a); typedef BIO * (*sk_BIO_copyfunc)(const BIO *a); static __attribute__((unused)) inline BIO *ossl_check_BIO_type(BIO *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_BIO_sk_type(const struct stack_st_BIO *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_BIO_sk_type(struct stack_st_BIO *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_BIO_compfunc_type(sk_BIO_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_BIO_copyfunc_type(sk_BIO_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_BIO_freefunc_type(sk_BIO_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
6337   # 365 "include/openssl/bio.h"
6338   typedef int asn1_ps_func (BIO *b, unsigned char **pbuf, int *plen,
6339                             void *parg);
6340   
6341   typedef void (*BIO_dgram_sctp_notification_handler_fn) (BIO *b,
6342                                                           void *context,
6343                                                           void *buf);
6344   # 397 "include/openssl/bio.h"
6345   typedef struct bio_msg_st {
6346       void *data;
6347       size_t data_len;
6348       BIO_ADDR *peer, *local;
6349       uint64_t flags;
6350   } BIO_MSG;
6351   
6352   typedef struct bio_mmsg_cb_args_st {
6353       BIO_MSG *msg;
6354       size_t stride, num_msg;
6355       uint64_t flags;
6356       size_t *msgs_processed;
6357   } BIO_MMSG_CB_ARGS;
6358   
6359   
6360   
6361   
6362   
6363   
6364   typedef struct bio_poll_descriptor_st {
6365       uint32_t type;
6366       union {
6367           int fd;
6368           void *custom;
6369           uintptr_t custom_ui;
6370           SSL *ssl;
6371       } value;
6372   } BIO_POLL_DESCRIPTOR;
6373   # 635 "include/openssl/bio.h"
6374   size_t BIO_ctrl_pending(BIO *b);
6375   size_t BIO_ctrl_wpending(BIO *b);
6376   # 655 "include/openssl/bio.h"
6377   size_t BIO_ctrl_get_write_guarantee(BIO *b);
6378   size_t BIO_ctrl_get_read_request(BIO *b);
6379   int BIO_ctrl_reset_read_request(BIO *b);
6380   # 704 "include/openssl/bio.h"
6381   int BIO_set_ex_data(BIO *bio, int idx, void *data);
6382   void *BIO_get_ex_data(const BIO *bio, int idx);
6383   uint64_t BIO_number_read(BIO *bio);
6384   uint64_t BIO_number_written(BIO *bio);
6385   
6386   
6387   int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix,
6388                           asn1_ps_func *prefix_free);
6389   int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix,
6390                           asn1_ps_func **pprefix_free);
6391   int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,
6392                           asn1_ps_func *suffix_free);
6393   int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
6394                           asn1_ps_func **psuffix_free);
6395   
6396   const BIO_METHOD *BIO_s_file(void);
6397   BIO *BIO_new_file(const char *filename, const char *mode);
6398   BIO *BIO_new_from_core_bio(OSSL_LIB_CTX *libctx, OSSL_CORE_BIO *corebio);
6399   
6400   BIO *BIO_new_fp(FILE *stream, int close_flag);
6401   
6402   BIO *BIO_new_ex(OSSL_LIB_CTX *libctx, const BIO_METHOD *method);
6403   BIO *BIO_new(const BIO_METHOD *type);
6404   int BIO_free(BIO *a);
6405   void BIO_set_data(BIO *a, void *ptr);
6406   void *BIO_get_data(BIO *a);
6407   void BIO_set_init(BIO *a, int init);
6408   int BIO_get_init(BIO *a);
6409   void BIO_set_shutdown(BIO *a, int shut);
6410   int BIO_get_shutdown(BIO *a);
6411   void BIO_vfree(BIO *a);
6412   int BIO_up_ref(BIO *a);
6413   int BIO_read(BIO *b, void *data, int dlen);
6414   int BIO_read_ex(BIO *b, void *data, size_t dlen, size_t *readbytes);
6415    int BIO_recvmmsg(BIO *b, BIO_MSG *msg,
6416                           size_t stride, size_t num_msg, uint64_t flags,
6417                           size_t *msgs_processed);
6418   int BIO_gets(BIO *bp, char *buf, int size);
6419   int BIO_get_line(BIO *bio, char *buf, int size);
6420   int BIO_write(BIO *b, const void *data, int dlen);
6421   int BIO_write_ex(BIO *b, const void *data, size_t dlen, size_t *written);
6422    int BIO_sendmmsg(BIO *b, BIO_MSG *msg,
6423                           size_t stride, size_t num_msg, uint64_t flags,
6424                           size_t *msgs_processed);
6425    int BIO_get_rpoll_descriptor(BIO *b, BIO_POLL_DESCRIPTOR *desc);
6426    int BIO_get_wpoll_descriptor(BIO *b, BIO_POLL_DESCRIPTOR *desc);
6427   int BIO_puts(BIO *bp, const char *buf);
6428   int BIO_indent(BIO *b, int indent, int max);
6429   long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);
6430   long BIO_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp);
6431   void *BIO_ptr_ctrl(BIO *bp, int cmd, long larg);
6432   long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg);
6433   BIO *BIO_push(BIO *b, BIO *append);
6434   BIO *BIO_pop(BIO *b);
6435   void BIO_free_all(BIO *a);
6436   BIO *BIO_find_type(BIO *b, int bio_type);
6437   BIO *BIO_next(BIO *b);
6438   void BIO_set_next(BIO *b, BIO *next);
6439   BIO *BIO_get_retry_BIO(BIO *bio, int *reason);
6440   int BIO_get_retry_reason(BIO *bio);
6441   void BIO_set_retry_reason(BIO *bio, int reason);
6442   BIO *BIO_dup_chain(BIO *in);
6443   
6444   int BIO_nread0(BIO *bio, char **buf);
6445   int BIO_nread(BIO *bio, char **buf, int num);
6446   int BIO_nwrite0(BIO *bio, char **buf);
6447   int BIO_nwrite(BIO *bio, char **buf, int num);
6448   
6449   const BIO_METHOD *BIO_s_mem(void);
6450   
6451   const BIO_METHOD *BIO_s_dgram_mem(void);
6452   
6453   const BIO_METHOD *BIO_s_secmem(void);
6454   BIO *BIO_new_mem_buf(const void *buf, int len);
6455   
6456   const BIO_METHOD *BIO_s_socket(void);
6457   const BIO_METHOD *BIO_s_connect(void);
6458   const BIO_METHOD *BIO_s_accept(void);
6459   
6460   const BIO_METHOD *BIO_s_fd(void);
6461   const BIO_METHOD *BIO_s_log(void);
6462   const BIO_METHOD *BIO_s_bio(void);
6463   const BIO_METHOD *BIO_s_null(void);
6464   const BIO_METHOD *BIO_f_null(void);
6465   const BIO_METHOD *BIO_f_buffer(void);
6466   const BIO_METHOD *BIO_f_readbuffer(void);
6467   const BIO_METHOD *BIO_f_linebuffer(void);
6468   const BIO_METHOD *BIO_f_nbio_test(void);
6469   const BIO_METHOD *BIO_f_prefix(void);
6470   const BIO_METHOD *BIO_s_core(void);
6471   
6472   const BIO_METHOD *BIO_s_dgram_pair(void);
6473   const BIO_METHOD *BIO_s_datagram(void);
6474   int BIO_dgram_non_fatal_error(int error);
6475   BIO *BIO_new_dgram(int fd, int close_flag);
6476   # 812 "include/openssl/bio.h"
6477   int BIO_sock_should_retry(int i);
6478   int BIO_sock_non_fatal_error(int error);
6479   int BIO_err_is_non_fatal(unsigned int errcode);
6480   int BIO_socket_wait(int fd, int for_read, time_t max_time);
6481   
6482   int BIO_wait(BIO *bio, time_t max_time, unsigned int nap_milliseconds);
6483   int BIO_do_connect_retry(BIO *bio, int timeout, int nap_milliseconds);
6484   
6485   int BIO_fd_should_retry(int i);
6486   int BIO_fd_non_fatal_error(int error);
6487   int BIO_dump_cb(int (*cb) (const void *data, size_t len, void *u),
6488                   void *u, const void *s, int len);
6489   int BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u),
6490                          void *u, const void *s, int len, int indent);
6491   int BIO_dump(BIO *b, const void *bytes, int len);
6492   int BIO_dump_indent(BIO *b, const void *bytes, int len, int indent);
6493   
6494   int BIO_dump_fp(FILE *fp, const void *s, int len);
6495   int BIO_dump_indent_fp(FILE *fp, const void *s, int len, int indent);
6496   
6497   int BIO_hex_string(BIO *out, int indent, int width, const void *data,
6498                      int datalen);
6499   
6500   
6501   BIO_ADDR *BIO_ADDR_new(void);
6502   int BIO_ADDR_copy(BIO_ADDR *dst, const BIO_ADDR *src);
6503   BIO_ADDR *BIO_ADDR_dup(const BIO_ADDR *ap);
6504   int BIO_ADDR_rawmake(BIO_ADDR *ap, int family,
6505                        const void *where, size_t wherelen, unsigned short port);
6506   void BIO_ADDR_free(BIO_ADDR *);
6507   void BIO_ADDR_clear(BIO_ADDR *ap);
6508   int BIO_ADDR_family(const BIO_ADDR *ap);
6509   int BIO_ADDR_rawaddress(const BIO_ADDR *ap, void *p, size_t *l);
6510   unsigned short BIO_ADDR_rawport(const BIO_ADDR *ap);
6511   char *BIO_ADDR_hostname_string(const BIO_ADDR *ap, int numeric);
6512   char *BIO_ADDR_service_string(const BIO_ADDR *ap, int numeric);
6513   char *BIO_ADDR_path_string(const BIO_ADDR *ap);
6514   
6515   const BIO_ADDRINFO *BIO_ADDRINFO_next(const BIO_ADDRINFO *bai);
6516   int BIO_ADDRINFO_family(const BIO_ADDRINFO *bai);
6517   int BIO_ADDRINFO_socktype(const BIO_ADDRINFO *bai);
6518   int BIO_ADDRINFO_protocol(const BIO_ADDRINFO *bai);
6519   const BIO_ADDR *BIO_ADDRINFO_address(const BIO_ADDRINFO *bai);
6520   void BIO_ADDRINFO_free(BIO_ADDRINFO *bai);
6521   
6522   enum BIO_hostserv_priorities {
6523       BIO_PARSE_PRIO_HOST, BIO_PARSE_PRIO_SERV
6524   };
6525   int BIO_parse_hostserv(const char *hostserv, char **host, char **service,
6526                          enum BIO_hostserv_priorities hostserv_prio);
6527   enum BIO_lookup_type {
6528       BIO_LOOKUP_CLIENT, BIO_LOOKUP_SERVER
6529   };
6530   int BIO_lookup(const char *host, const char *service,
6531                  enum BIO_lookup_type lookup_type,
6532                  int family, int socktype, BIO_ADDRINFO **res);
6533   int BIO_lookup_ex(const char *host, const char *service,
6534                     int lookup_type, int family, int socktype, int protocol,
6535                     BIO_ADDRINFO **res);
6536   int BIO_sock_error(int sock);
6537   int BIO_socket_ioctl(int fd, long type, void *arg);
6538   int BIO_socket_nbio(int fd, int mode);
6539   int BIO_sock_init(void);
6540   
6541   
6542   
6543   int BIO_set_tcp_ndelay(int sock, int turn_on);
6544   
6545   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) struct hostent *BIO_gethostbyname(const char *name);
6546   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) int BIO_get_port(const char *str, unsigned short *port_ptr);
6547   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) int BIO_get_host_ip(const char *str, unsigned char *ip);
6548   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) int BIO_get_accept_socket(char *host_port, int mode);
6549   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) int BIO_accept(int sock, char **ip_port);
6550   
6551   
6552   union BIO_sock_info_u {
6553       BIO_ADDR *addr;
6554   };
6555   enum BIO_sock_info_type {
6556       BIO_SOCK_INFO_ADDRESS
6557   };
6558   int BIO_sock_info(int sock,
6559                     enum BIO_sock_info_type type, union BIO_sock_info_u *info);
6560   # 903 "include/openssl/bio.h"
6561   int BIO_socket(int domain, int socktype, int protocol, int options);
6562   int BIO_connect(int sock, const BIO_ADDR *addr, int options);
6563   int BIO_bind(int sock, const BIO_ADDR *addr, int options);
6564   int BIO_listen(int sock, const BIO_ADDR *addr, int options);
6565   int BIO_accept_ex(int accept_sock, BIO_ADDR *addr, int options);
6566   int BIO_closesocket(int sock);
6567   
6568   BIO *BIO_new_socket(int sock, int close_flag);
6569   BIO *BIO_new_connect(const char *host_port);
6570   BIO *BIO_new_accept(const char *host_port);
6571   
6572   
6573   BIO *BIO_new_fd(int fd, int close_flag);
6574   
6575   int BIO_new_bio_pair(BIO **bio1, size_t writebuf1,
6576                        BIO **bio2, size_t writebuf2);
6577   
6578   int BIO_new_bio_dgram_pair(BIO **bio1, size_t writebuf1,
6579                              BIO **bio2, size_t writebuf2);
6580   # 930 "include/openssl/bio.h"
6581   void BIO_copy_next_retry(BIO *b);
6582   # 954 "include/openssl/bio.h"
6583   int BIO_printf(BIO *bio, const char *format, ...)
6584   __attribute__((__format__(__gnu_printf__, 2, 3)));
6585   int BIO_vprintf(BIO *bio, const char *format, va_list args)
6586   __attribute__((__format__(__gnu_printf__, 2, 0)));
6587   int BIO_snprintf(char *buf, size_t n, const char *format, ...)
6588   __attribute__((__format__(__gnu_printf__, 3, 4)));
6589   int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
6590   __attribute__((__format__(__gnu_printf__, 3, 0)));
6591   
6592   
6593   
6594   
6595   BIO_METHOD *BIO_meth_new(int type, const char *name);
6596   void BIO_meth_free(BIO_METHOD *biom);
6597   int (*BIO_meth_get_write(const BIO_METHOD *biom)) (BIO *, const char *, int);
6598   int (*BIO_meth_get_write_ex(const BIO_METHOD *biom)) (BIO *, const char *, size_t,
6599                                                   size_t *);
6600   int BIO_meth_set_write(BIO_METHOD *biom,
6601                          int (*write) (BIO *, const char *, int));
6602   int BIO_meth_set_write_ex(BIO_METHOD *biom,
6603                          int (*bwrite) (BIO *, const char *, size_t, size_t *));
6604   int BIO_meth_set_sendmmsg(BIO_METHOD *biom,
6605                             int (*f) (BIO *, BIO_MSG *, size_t, size_t,
6606                                       uint64_t, size_t *));
6607   int (*BIO_meth_get_sendmmsg(const BIO_METHOD *biom))(BIO *, BIO_MSG *,
6608                                                        size_t, size_t,
6609                                                        uint64_t, size_t *);
6610   int (*BIO_meth_get_read(const BIO_METHOD *biom)) (BIO *, char *, int);
6611   int (*BIO_meth_get_read_ex(const BIO_METHOD *biom)) (BIO *, char *, size_t, size_t *);
6612   int BIO_meth_set_read(BIO_METHOD *biom,
6613                         int (*read) (BIO *, char *, int));
6614   int BIO_meth_set_read_ex(BIO_METHOD *biom,
6615                            int (*bread) (BIO *, char *, size_t, size_t *));
6616   int BIO_meth_set_recvmmsg(BIO_METHOD *biom,
6617                             int (*f) (BIO *, BIO_MSG *, size_t, size_t,
6618                                       uint64_t, size_t *));
6619   int (*BIO_meth_get_recvmmsg(const BIO_METHOD *biom))(BIO *, BIO_MSG *,
6620                                                        size_t, size_t,
6621                                                        uint64_t, size_t *);
6622   int (*BIO_meth_get_puts(const BIO_METHOD *biom)) (BIO *, const char *);
6623   int BIO_meth_set_puts(BIO_METHOD *biom,
6624                         int (*puts) (BIO *, const char *));
6625   int (*BIO_meth_get_gets(const BIO_METHOD *biom)) (BIO *, char *, int);
6626   int BIO_meth_set_gets(BIO_METHOD *biom,
6627                         int (*ossl_gets) (BIO *, char *, int));
6628   long (*BIO_meth_get_ctrl(const BIO_METHOD *biom)) (BIO *, int, long, void *);
6629   int BIO_meth_set_ctrl(BIO_METHOD *biom,
6630                         long (*ctrl) (BIO *, int, long, void *));
6631   int (*BIO_meth_get_create(const BIO_METHOD *bion)) (BIO *);
6632   int BIO_meth_set_create(BIO_METHOD *biom, int (*create) (BIO *));
6633   int (*BIO_meth_get_destroy(const BIO_METHOD *biom)) (BIO *);
6634   int BIO_meth_set_destroy(BIO_METHOD *biom, int (*destroy) (BIO *));
6635   long (*BIO_meth_get_callback_ctrl(const BIO_METHOD *biom))
6636                                    (BIO *, int, BIO_info_cb *);
6637   int BIO_meth_set_callback_ctrl(BIO_METHOD *biom,
6638                                  long (*callback_ctrl) (BIO *, int,
6639                                                         BIO_info_cb *));
6640   # 23 "ssl/ssl_local.h" 2
6641   # 1 "include/openssl/comp.h" 1
6642   # 12 "include/openssl/comp.h"
6643           
6644   # 23 "include/openssl/comp.h"
6645   # 1 "include/openssl/comperr.h" 1
6646   # 13 "include/openssl/comperr.h"
6647           
6648   # 24 "include/openssl/comp.h" 2
6649   
6650   
6651   
6652   
6653   
6654   
6655   COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
6656   const COMP_METHOD *COMP_CTX_get_method(const COMP_CTX *ctx);
6657   int COMP_CTX_get_type(const COMP_CTX* comp);
6658   int COMP_get_type(const COMP_METHOD *meth);
6659   const char *COMP_get_name(const COMP_METHOD *meth);
6660   void COMP_CTX_free(COMP_CTX *ctx);
6661   
6662   int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
6663                           unsigned char *in, int ilen);
6664   int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
6665                         unsigned char *in, int ilen);
6666   
6667   COMP_METHOD *COMP_zlib(void);
6668   COMP_METHOD *COMP_zlib_oneshot(void);
6669   COMP_METHOD *COMP_brotli(void);
6670   COMP_METHOD *COMP_brotli_oneshot(void);
6671   COMP_METHOD *COMP_zstd(void);
6672   COMP_METHOD *COMP_zstd_oneshot(void);
6673   
6674   
6675   
6676   
6677   
6678   
6679   const BIO_METHOD *BIO_f_zlib(void);
6680   const BIO_METHOD *BIO_f_brotli(void);
6681   const BIO_METHOD *BIO_f_zstd(void);
6682   # 24 "ssl/ssl_local.h" 2
6683   # 1 "include/openssl/dsa.h" 1
6684   # 12 "include/openssl/dsa.h"
6685           
6686   
6687   
6688   
6689   
6690   
6691   
6692   
6693   # 1 "include/openssl/types.h" 1
6694   # 21 "include/openssl/dsa.h" 2
6695   
6696   
6697   
6698   
6699   
6700   # 1 "include/openssl/asn1.h" 1
6701   # 17 "include/openssl/asn1.h"
6702           
6703   # 32 "include/openssl/asn1.h"
6704   # 1 "include/openssl/asn1err.h" 1
6705   # 13 "include/openssl/asn1err.h"
6706           
6707   # 33 "include/openssl/asn1.h" 2
6708   
6709   
6710   # 1 "include/openssl/types.h" 1
6711   # 36 "include/openssl/asn1.h" 2
6712   # 1 "include/openssl/bn.h" 1
6713   # 13 "include/openssl/bn.h"
6714           
6715   # 25 "include/openssl/bn.h"
6716   # 1 "include/openssl/types.h" 1
6717   # 26 "include/openssl/bn.h" 2
6718   
6719   # 1 "include/openssl/bnerr.h" 1
6720   # 13 "include/openssl/bnerr.h"
6721           
6722   # 28 "include/openssl/bn.h" 2
6723   # 76 "include/openssl/bn.h"
6724   void BN_set_flags(BIGNUM *b, int n);
6725   int BN_get_flags(const BIGNUM *b, int n);
6726   # 94 "include/openssl/bn.h"
6727   void BN_with_flags(BIGNUM *dest, const BIGNUM *b, int flags);
6728   
6729   
6730   int BN_GENCB_call(BN_GENCB *cb, int a, int b);
6731   
6732   BN_GENCB *BN_GENCB_new(void);
6733   void BN_GENCB_free(BN_GENCB *cb);
6734   
6735   
6736   void BN_GENCB_set_old(BN_GENCB *gencb, void (*callback) (int, int, void *),
6737                         void *cb_arg);
6738   
6739   
6740   void BN_GENCB_set(BN_GENCB *gencb, int (*callback) (int, int, BN_GENCB *),
6741                     void *cb_arg);
6742   
6743   void *BN_GENCB_get_arg(BN_GENCB *cb);
6744   # 191 "include/openssl/bn.h"
6745   int BN_abs_is_word(const BIGNUM *a, const unsigned long w);
6746   int BN_is_zero(const BIGNUM *a);
6747   int BN_is_one(const BIGNUM *a);
6748   int BN_is_word(const BIGNUM *a, const unsigned long w);
6749   int BN_is_odd(const BIGNUM *a);
6750   
6751   
6752   
6753   void BN_zero_ex(BIGNUM *a);
6754   
6755   
6756   
6757   
6758   
6759   
6760   
6761   const BIGNUM *BN_value_one(void);
6762   char *BN_options(void);
6763   BN_CTX *BN_CTX_new_ex(OSSL_LIB_CTX *ctx);
6764   BN_CTX *BN_CTX_new(void);
6765   BN_CTX *BN_CTX_secure_new_ex(OSSL_LIB_CTX *ctx);
6766   BN_CTX *BN_CTX_secure_new(void);
6767   void BN_CTX_free(BN_CTX *c);
6768   void BN_CTX_start(BN_CTX *ctx);
6769   BIGNUM *BN_CTX_get(BN_CTX *ctx);
6770   void BN_CTX_end(BN_CTX *ctx);
6771   int BN_rand_ex(BIGNUM *rnd, int bits, int top, int bottom,
6772                  unsigned int strength, BN_CTX *ctx);
6773   int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
6774   int BN_priv_rand_ex(BIGNUM *rnd, int bits, int top, int bottom,
6775                       unsigned int strength, BN_CTX *ctx);
6776   int BN_priv_rand(BIGNUM *rnd, int bits, int top, int bottom);
6777   int BN_rand_range_ex(BIGNUM *r, const BIGNUM *range, unsigned int strength,
6778                        BN_CTX *ctx);
6779   int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
6780   int BN_priv_rand_range_ex(BIGNUM *r, const BIGNUM *range,
6781                             unsigned int strength, BN_CTX *ctx);
6782   int BN_priv_rand_range(BIGNUM *rnd, const BIGNUM *range);
6783   
6784   __attribute__((deprecated("Since OpenSSL " "3.0")))
6785   int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
6786   __attribute__((deprecated("Since OpenSSL " "3.0")))
6787   int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
6788   
6789   int BN_num_bits(const BIGNUM *a);
6790   int BN_num_bits_word(unsigned long l);
6791   int BN_security_bits(int L, int N);
6792   BIGNUM *BN_new(void);
6793   BIGNUM *BN_secure_new(void);
6794   void BN_clear_free(BIGNUM *a);
6795   BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
6796   void BN_swap(BIGNUM *a, BIGNUM *b);
6797   BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
6798   BIGNUM *BN_signed_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
6799   int BN_bn2bin(const BIGNUM *a, unsigned char *to);
6800   int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen);
6801   int BN_signed_bn2bin(const BIGNUM *a, unsigned char *to, int tolen);
6802   BIGNUM *BN_lebin2bn(const unsigned char *s, int len, BIGNUM *ret);
6803   BIGNUM *BN_signed_lebin2bn(const unsigned char *s, int len, BIGNUM *ret);
6804   int BN_bn2lebinpad(const BIGNUM *a, unsigned char *to, int tolen);
6805   int BN_signed_bn2lebin(const BIGNUM *a, unsigned char *to, int tolen);
6806   BIGNUM *BN_native2bn(const unsigned char *s, int len, BIGNUM *ret);
6807   BIGNUM *BN_signed_native2bn(const unsigned char *s, int len, BIGNUM *ret);
6808   int BN_bn2nativepad(const BIGNUM *a, unsigned char *to, int tolen);
6809   int BN_signed_bn2native(const BIGNUM *a, unsigned char *to, int tolen);
6810   BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret);
6811   int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
6812   int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
6813   int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
6814   int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
6815   int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
6816   int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
6817   int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
6818   
6819   
6820   
6821   
6822   void BN_set_negative(BIGNUM *b, int n);
6823   
6824   
6825   
6826   
6827   int BN_is_negative(const BIGNUM *b);
6828   
6829   int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
6830              BN_CTX *ctx);
6831   
6832   int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
6833   int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
6834                  BN_CTX *ctx);
6835   int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
6836                        const BIGNUM *m);
6837   int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
6838                  BN_CTX *ctx);
6839   int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
6840                        const BIGNUM *m);
6841   int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
6842                  BN_CTX *ctx);
6843   int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
6844   int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
6845   int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);
6846   int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m,
6847                     BN_CTX *ctx);
6848   int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
6849   
6850   unsigned long BN_mod_word(const BIGNUM *a, unsigned long w);
6851   unsigned long BN_div_word(BIGNUM *a, unsigned long w);
6852   int BN_mul_word(BIGNUM *a, unsigned long w);
6853   int BN_add_word(BIGNUM *a, unsigned long w);
6854   int BN_sub_word(BIGNUM *a, unsigned long w);
6855   int BN_set_word(BIGNUM *a, unsigned long w);
6856   unsigned long BN_get_word(const BIGNUM *a);
6857   
6858   int BN_cmp(const BIGNUM *a, const BIGNUM *b);
6859   void BN_free(BIGNUM *a);
6860   int BN_is_bit_set(const BIGNUM *a, int n);
6861   int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
6862   int BN_lshift1(BIGNUM *r, const BIGNUM *a);
6863   int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
6864   
6865   int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
6866                  const BIGNUM *m, BN_CTX *ctx);
6867   int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
6868                       const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
6869   int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
6870                                 const BIGNUM *m, BN_CTX *ctx,
6871                                 BN_MONT_CTX *in_mont);
6872   int BN_mod_exp_mont_word(BIGNUM *r, unsigned long a, const BIGNUM *p,
6873                            const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
6874   int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
6875                        const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
6876                        BN_CTX *ctx, BN_MONT_CTX *m_ctx);
6877   int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
6878                         const BIGNUM *m, BN_CTX *ctx);
6879   int BN_mod_exp_mont_consttime_x2(BIGNUM *rr1, const BIGNUM *a1, const BIGNUM *p1,
6880                                    const BIGNUM *m1, BN_MONT_CTX *in_mont1,
6881                                    BIGNUM *rr2, const BIGNUM *a2, const BIGNUM *p2,
6882                                    const BIGNUM *m2, BN_MONT_CTX *in_mont2,
6883                                    BN_CTX *ctx);
6884   
6885   int BN_mask_bits(BIGNUM *a, int n);
6886   
6887   int BN_print_fp(FILE *fp, const BIGNUM *a);
6888   
6889   int BN_print(BIO *bio, const BIGNUM *a);
6890   int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);
6891   int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
6892   int BN_rshift1(BIGNUM *r, const BIGNUM *a);
6893   void BN_clear(BIGNUM *a);
6894   BIGNUM *BN_dup(const BIGNUM *a);
6895   int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
6896   int BN_set_bit(BIGNUM *a, int n);
6897   int BN_clear_bit(BIGNUM *a, int n);
6898   char *BN_bn2hex(const BIGNUM *a);
6899   char *BN_bn2dec(const BIGNUM *a);
6900   int BN_hex2bn(BIGNUM **a, const char *str);
6901   int BN_dec2bn(BIGNUM **a, const char *str);
6902   int BN_asc2bn(BIGNUM **a, const char *str);
6903   int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
6904   int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
6905   
6906   
6907   int BN_are_coprime(BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
6908   BIGNUM *BN_mod_inverse(BIGNUM *ret,
6909                          const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
6910   BIGNUM *BN_mod_sqrt(BIGNUM *ret,
6911                       const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
6912   
6913   void BN_consttime_swap(unsigned long swap, BIGNUM *a, BIGNUM *b, int nwords);
6914   
6915   
6916   
6917   __attribute__((deprecated("Since OpenSSL " "0.9.8")))
6918   BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
6919                             const BIGNUM *add, const BIGNUM *rem,
6920                             void (*callback) (int, int, void *),
6921                             void *cb_arg);
6922   __attribute__((deprecated("Since OpenSSL " "0.9.8")))
6923   int BN_is_prime(const BIGNUM *p, int nchecks,
6924                   void (*callback) (int, int, void *),
6925                   BN_CTX *ctx, void *cb_arg);
6926   __attribute__((deprecated("Since OpenSSL " "0.9.8")))
6927   int BN_is_prime_fasttest(const BIGNUM *p, int nchecks,
6928                            void (*callback) (int, int, void *),
6929                            BN_CTX *ctx, void *cb_arg,
6930                            int do_trial_division);
6931   
6932   
6933   __attribute__((deprecated("Since OpenSSL " "3.0")))
6934   int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
6935   __attribute__((deprecated("Since OpenSSL " "3.0")))
6936   int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
6937                               int do_trial_division, BN_GENCB *cb);
6938   
6939   
6940   int BN_generate_prime_ex2(BIGNUM *ret, int bits, int safe,
6941                             const BIGNUM *add, const BIGNUM *rem, BN_GENCB *cb,
6942                             BN_CTX *ctx);
6943   int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
6944                            const BIGNUM *rem, BN_GENCB *cb);
6945   int BN_check_prime(const BIGNUM *p, BN_CTX *ctx, BN_GENCB *cb);
6946   
6947   
6948   __attribute__((deprecated("Since OpenSSL " "3.0")))
6949   int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
6950   
6951   __attribute__((deprecated("Since OpenSSL " "3.0")))
6952   int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
6953                               const BIGNUM *Xp, const BIGNUM *Xp1,
6954                               const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,
6955                               BN_GENCB *cb);
6956   __attribute__((deprecated("Since OpenSSL " "3.0")))
6957   int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1,
6958                                 BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e,
6959                                 BN_CTX *ctx, BN_GENCB *cb);
6960   
6961   
6962   BN_MONT_CTX *BN_MONT_CTX_new(void);
6963   int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
6964                             BN_MONT_CTX *mont, BN_CTX *ctx);
6965   int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
6966                        BN_CTX *ctx);
6967   int BN_from_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
6968                          BN_CTX *ctx);
6969   void BN_MONT_CTX_free(BN_MONT_CTX *mont);
6970   int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
6971   BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from);
6972   BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, CRYPTO_RWLOCK *lock,
6973                                       const BIGNUM *mod, BN_CTX *ctx);
6974   
6975   
6976   
6977   
6978   
6979   BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);
6980   void BN_BLINDING_free(BN_BLINDING *b);
6981   int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx);
6982   int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
6983   int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
6984   int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
6985   int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b,
6986                             BN_CTX *);
6987   
6988   int BN_BLINDING_is_current_thread(BN_BLINDING *b);
6989   void BN_BLINDING_set_current_thread(BN_BLINDING *b);
6990   int BN_BLINDING_lock(BN_BLINDING *b);
6991   int BN_BLINDING_unlock(BN_BLINDING *b);
6992   
6993   unsigned long BN_BLINDING_get_flags(const BN_BLINDING *);
6994   void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long);
6995   BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
6996                                         const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
6997                                         int (*bn_mod_exp) (BIGNUM *r,
6998                                                            const BIGNUM *a,
6999                                                            const BIGNUM *p,
7000                                                            const BIGNUM *m,
7001                                                            BN_CTX *ctx,
7002                                                            BN_MONT_CTX *m_ctx),
7003                                         BN_MONT_CTX *m_ctx);
7004   
7005   __attribute__((deprecated("Since OpenSSL " "0.9.8")))
7006   void BN_set_params(int mul, int high, int low, int mont);
7007   __attribute__((deprecated("Since OpenSSL " "0.9.8")))
7008   int BN_get_params(int which);
7009   
7010   
7011   BN_RECP_CTX *BN_RECP_CTX_new(void);
7012   void BN_RECP_CTX_free(BN_RECP_CTX *recp);
7013   int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx);
7014   int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
7015                             BN_RECP_CTX *recp, BN_CTX *ctx);
7016   int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
7017                       const BIGNUM *m, BN_CTX *ctx);
7018   int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
7019                   BN_RECP_CTX *recp, BN_CTX *ctx);
7020   # 479 "include/openssl/bn.h"
7021   int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
7022   
7023   
7024   
7025   
7026   int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p);
7027   
7028   int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
7029                       const BIGNUM *p, BN_CTX *ctx);
7030   
7031   int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
7032   
7033   int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx);
7034   
7035   int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
7036                       const BIGNUM *p, BN_CTX *ctx);
7037   
7038   int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
7039                       const BIGNUM *p, BN_CTX *ctx);
7040   
7041   int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
7042                        BN_CTX *ctx);
7043   
7044   int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
7045                              BN_CTX *ctx);
7046   # 512 "include/openssl/bn.h"
7047   int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);
7048   
7049   int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
7050                           const int p[], BN_CTX *ctx);
7051   
7052   int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],
7053                           BN_CTX *ctx);
7054   
7055   int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[],
7056                           BN_CTX *ctx);
7057   
7058   int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
7059                           const int p[], BN_CTX *ctx);
7060   
7061   int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
7062                           const int p[], BN_CTX *ctx);
7063   
7064   int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
7065                            const int p[], BN_CTX *ctx);
7066   
7067   int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
7068                                  const int p[], BN_CTX *ctx);
7069   int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);
7070   int BN_GF2m_arr2poly(const int p[], BIGNUM *a);
7071   
7072   
7073   
7074   
7075   
7076   
7077   int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
7078   int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
7079   int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
7080   int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
7081   int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
7082   
7083   const BIGNUM *BN_get0_nist_prime_192(void);
7084   const BIGNUM *BN_get0_nist_prime_224(void);
7085   const BIGNUM *BN_get0_nist_prime_256(void);
7086   const BIGNUM *BN_get0_nist_prime_384(void);
7087   const BIGNUM *BN_get0_nist_prime_521(void);
7088   
7089   int (*BN_nist_mod_func(const BIGNUM *p)) (BIGNUM *r, const BIGNUM *a,
7090                                             const BIGNUM *field, BN_CTX *ctx);
7091   
7092   int BN_generate_dsa_nonce(BIGNUM *out, const BIGNUM *range,
7093                             const BIGNUM *priv, const unsigned char *message,
7094                             size_t message_len, BN_CTX *ctx);
7095   
7096   
7097   BIGNUM *BN_get_rfc2409_prime_768(BIGNUM *bn);
7098   BIGNUM *BN_get_rfc2409_prime_1024(BIGNUM *bn);
7099   
7100   
7101   BIGNUM *BN_get_rfc3526_prime_1536(BIGNUM *bn);
7102   BIGNUM *BN_get_rfc3526_prime_2048(BIGNUM *bn);
7103   BIGNUM *BN_get_rfc3526_prime_3072(BIGNUM *bn);
7104   BIGNUM *BN_get_rfc3526_prime_4096(BIGNUM *bn);
7105   BIGNUM *BN_get_rfc3526_prime_6144(BIGNUM *bn);
7106   BIGNUM *BN_get_rfc3526_prime_8192(BIGNUM *bn);
7107   # 584 "include/openssl/bn.h"
7108   int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom);
7109   # 37 "include/openssl/asn1.h" 2
7110   # 132 "include/openssl/asn1.h"
7111   struct stack_st_X509_ALGOR; typedef int (*sk_X509_ALGOR_compfunc)(const X509_ALGOR * const *a, const X509_ALGOR *const *b); typedef void (*sk_X509_ALGOR_freefunc)(X509_ALGOR *a); typedef X509_ALGOR * (*sk_X509_ALGOR_copyfunc)(const X509_ALGOR *a); static __attribute__((unused)) inline X509_ALGOR *ossl_check_X509_ALGOR_type(X509_ALGOR *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_ALGOR_sk_type(const struct stack_st_X509_ALGOR *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_ALGOR_sk_type(struct stack_st_X509_ALGOR *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_ALGOR_compfunc_type(sk_X509_ALGOR_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_ALGOR_copyfunc_type(sk_X509_ALGOR_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_ALGOR_freefunc_type(sk_X509_ALGOR_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
7112   # 186 "include/openssl/asn1.h"
7113   struct asn1_string_st {
7114       int length;
7115       int type;
7116       unsigned char *data;
7117   
7118   
7119   
7120   
7121   
7122       long flags;
7123   };
7124   
7125   
7126   
7127   
7128   
7129   
7130   
7131   typedef struct ASN1_ENCODING_st {
7132       unsigned char *enc;
7133       long len;
7134       int modified;
7135   } ASN1_ENCODING;
7136   # 226 "include/openssl/asn1.h"
7137   struct asn1_string_table_st {
7138       int nid;
7139       long minsize;
7140       long maxsize;
7141       unsigned long mask;
7142       unsigned long flags;
7143   };
7144   
7145   struct stack_st_ASN1_STRING_TABLE; typedef int (*sk_ASN1_STRING_TABLE_compfunc)(const ASN1_STRING_TABLE * const *a, const ASN1_STRING_TABLE *const *b); typedef void (*sk_ASN1_STRING_TABLE_freefunc)(ASN1_STRING_TABLE *a); typedef ASN1_STRING_TABLE * (*sk_ASN1_STRING_TABLE_copyfunc)(const ASN1_STRING_TABLE *a); static __attribute__((unused)) inline ASN1_STRING_TABLE *ossl_check_ASN1_STRING_TABLE_type(ASN1_STRING_TABLE *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_ASN1_STRING_TABLE_sk_type(const struct stack_st_ASN1_STRING_TABLE *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_ASN1_STRING_TABLE_sk_type(struct stack_st_ASN1_STRING_TABLE *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_ASN1_STRING_TABLE_compfunc_type(sk_ASN1_STRING_TABLE_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_ASN1_STRING_TABLE_copyfunc_type(sk_ASN1_STRING_TABLE_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_ASN1_STRING_TABLE_freefunc_type(sk_ASN1_STRING_TABLE_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
7146   # 276 "include/openssl/asn1.h"
7147   typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE;
7148   typedef struct ASN1_TLC_st ASN1_TLC;
7149   
7150   typedef struct ASN1_VALUE_st ASN1_VALUE;
7151   # 372 "include/openssl/asn1.h"
7152   typedef void *d2i_of_void(void **, const unsigned char **, long);
7153   typedef int i2d_of_void(const void *, unsigned char **);
7154   # 418 "include/openssl/asn1.h"
7155   typedef const ASN1_ITEM *ASN1_ITEM_EXP (void);
7156   # 523 "include/openssl/asn1.h"
7157   struct asn1_type_st {
7158       int type;
7159       union {
7160           char *ptr;
7161           ASN1_BOOLEAN boolean;
7162           ASN1_STRING *asn1_string;
7163           ASN1_OBJECT *object;
7164           ASN1_INTEGER *integer;
7165           ASN1_ENUMERATED *enumerated;
7166           ASN1_BIT_STRING *bit_string;
7167           ASN1_OCTET_STRING *octet_string;
7168           ASN1_PRINTABLESTRING *printablestring;
7169           ASN1_T61STRING *t61string;
7170           ASN1_IA5STRING *ia5string;
7171           ASN1_GENERALSTRING *generalstring;
7172           ASN1_BMPSTRING *bmpstring;
7173           ASN1_UNIVERSALSTRING *universalstring;
7174           ASN1_UTCTIME *utctime;
7175           ASN1_GENERALIZEDTIME *generalizedtime;
7176           ASN1_VISIBLESTRING *visiblestring;
7177           ASN1_UTF8STRING *utf8string;
7178   
7179   
7180   
7181   
7182           ASN1_STRING *set;
7183           ASN1_STRING *sequence;
7184           ASN1_VALUE *asn1_value;
7185       } value;
7186   };
7187   
7188   struct stack_st_ASN1_TYPE; typedef int (*sk_ASN1_TYPE_compfunc)(const ASN1_TYPE * const *a, const ASN1_TYPE *const *b); typedef void (*sk_ASN1_TYPE_freefunc)(ASN1_TYPE *a); typedef ASN1_TYPE * (*sk_ASN1_TYPE_copyfunc)(const ASN1_TYPE *a); static __attribute__((unused)) inline ASN1_TYPE *ossl_check_ASN1_TYPE_type(ASN1_TYPE *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_ASN1_TYPE_sk_type(const struct stack_st_ASN1_TYPE *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_ASN1_TYPE_sk_type(struct stack_st_ASN1_TYPE *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_ASN1_TYPE_compfunc_type(sk_ASN1_TYPE_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_ASN1_TYPE_copyfunc_type(sk_ASN1_TYPE_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_ASN1_TYPE_freefunc_type(sk_ASN1_TYPE_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
7189   # 582 "include/openssl/asn1.h"
7190   typedef struct stack_st_ASN1_TYPE ASN1_SEQUENCE_ANY;
7191   
7192   extern ASN1_SEQUENCE_ANY *d2i_ASN1_SEQUENCE_ANY(ASN1_SEQUENCE_ANY **a, const unsigned char **in, long len); extern int i2d_ASN1_SEQUENCE_ANY(const ASN1_SEQUENCE_ANY *a, unsigned char **out); extern const ASN1_ITEM * ASN1_SEQUENCE_ANY_it(void);
7193   extern ASN1_SEQUENCE_ANY *d2i_ASN1_SET_ANY(ASN1_SEQUENCE_ANY **a, const unsigned char **in, long len); extern int i2d_ASN1_SET_ANY(const ASN1_SEQUENCE_ANY *a, unsigned char **out); extern const ASN1_ITEM * ASN1_SET_ANY_it(void);
7194   
7195   
7196   typedef struct BIT_STRING_BITNAME_st {
7197       int bitnum;
7198       const char *lname;
7199       const char *sname;
7200   } BIT_STRING_BITNAME;
7201   # 623 "include/openssl/asn1.h"
7202   extern ASN1_TYPE *ASN1_TYPE_new(void); extern void ASN1_TYPE_free(ASN1_TYPE *a);
7203   extern ASN1_TYPE *d2i_ASN1_TYPE(ASN1_TYPE **a, const unsigned char **in, long len); extern int i2d_ASN1_TYPE(const ASN1_TYPE *a, unsigned char **out); extern const ASN1_ITEM * ASN1_ANY_it(void);
7204   
7205   int ASN1_TYPE_get(const ASN1_TYPE *a);
7206   void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value);
7207   int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value);
7208   int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b);
7209   
7210   ASN1_TYPE *ASN1_TYPE_pack_sequence(const ASN1_ITEM *it, void *s, ASN1_TYPE **t);
7211   void *ASN1_TYPE_unpack_sequence(const ASN1_ITEM *it, const ASN1_TYPE *t);
7212   
7213   struct stack_st_ASN1_OBJECT; typedef int (*sk_ASN1_OBJECT_compfunc)(const ASN1_OBJECT * const *a, const ASN1_OBJECT *const *b); typedef void (*sk_ASN1_OBJECT_freefunc)(ASN1_OBJECT *a); typedef ASN1_OBJECT * (*sk_ASN1_OBJECT_copyfunc)(const ASN1_OBJECT *a); static __attribute__((unused)) inline ASN1_OBJECT *ossl_check_ASN1_OBJECT_type(ASN1_OBJECT *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_ASN1_OBJECT_sk_type(const struct stack_st_ASN1_OBJECT *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_ASN1_OBJECT_sk_type(struct stack_st_ASN1_OBJECT *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_ASN1_OBJECT_compfunc_type(sk_ASN1_OBJECT_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_ASN1_OBJECT_copyfunc_type(sk_ASN1_OBJECT_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_ASN1_OBJECT_freefunc_type(sk_ASN1_OBJECT_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
7214   # 662 "include/openssl/asn1.h"
7215   extern ASN1_OBJECT *ASN1_OBJECT_new(void); extern void ASN1_OBJECT_free(ASN1_OBJECT *a); extern ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **in, long len); extern int i2d_ASN1_OBJECT(const ASN1_OBJECT *a, unsigned char **out); extern const ASN1_ITEM * ASN1_OBJECT_it(void);
7216   
7217   ASN1_STRING *ASN1_STRING_new(void);
7218   void ASN1_STRING_free(ASN1_STRING *a);
7219   void ASN1_STRING_clear_free(ASN1_STRING *a);
7220   int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str);
7221   extern ASN1_STRING *ASN1_STRING_dup(const ASN1_STRING *a);
7222   ASN1_STRING *ASN1_STRING_type_new(int type);
7223   int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b);
7224   
7225   
7226   
7227   
7228   int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);
7229   void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len);
7230   int ASN1_STRING_length(const ASN1_STRING *x);
7231   
7232   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ASN1_STRING_length_set(ASN1_STRING *x, int n);
7233   
7234   int ASN1_STRING_type(const ASN1_STRING *x);
7235   
7236   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) unsigned char *ASN1_STRING_data(ASN1_STRING *x);
7237   
7238   const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *x);
7239   
7240   extern ASN1_BIT_STRING *ASN1_BIT_STRING_new(void); extern void ASN1_BIT_STRING_free(ASN1_BIT_STRING *a); extern ASN1_BIT_STRING *d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, const unsigned char **in, long len); extern int i2d_ASN1_BIT_STRING(const ASN1_BIT_STRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_BIT_STRING_it(void);
7241   int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, int length);
7242   int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value);
7243   int ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n);
7244   int ASN1_BIT_STRING_check(const ASN1_BIT_STRING *a,
7245                             const unsigned char *flags, int flags_len);
7246   
7247   int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
7248                                  BIT_STRING_BITNAME *tbl, int indent);
7249   int ASN1_BIT_STRING_num_asc(const char *name, BIT_STRING_BITNAME *tbl);
7250   int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, const char *name, int value,
7251                               BIT_STRING_BITNAME *tbl);
7252   
7253   struct stack_st_ASN1_INTEGER; typedef int (*sk_ASN1_INTEGER_compfunc)(const ASN1_INTEGER * const *a, const ASN1_INTEGER *const *b); typedef void (*sk_ASN1_INTEGER_freefunc)(ASN1_INTEGER *a); typedef ASN1_INTEGER * (*sk_ASN1_INTEGER_copyfunc)(const ASN1_INTEGER *a); static __attribute__((unused)) inline ASN1_INTEGER *ossl_check_ASN1_INTEGER_type(ASN1_INTEGER *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_ASN1_INTEGER_sk_type(const struct stack_st_ASN1_INTEGER *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_ASN1_INTEGER_sk_type(struct stack_st_ASN1_INTEGER *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_ASN1_INTEGER_compfunc_type(sk_ASN1_INTEGER_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_ASN1_INTEGER_copyfunc_type(sk_ASN1_INTEGER_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_ASN1_INTEGER_freefunc_type(sk_ASN1_INTEGER_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
7254   # 729 "include/openssl/asn1.h"
7255   extern ASN1_INTEGER *ASN1_INTEGER_new(void); extern void ASN1_INTEGER_free(ASN1_INTEGER *a); extern ASN1_INTEGER *d2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **in, long len); extern int i2d_ASN1_INTEGER(const ASN1_INTEGER *a, unsigned char **out); extern const ASN1_ITEM * ASN1_INTEGER_it(void);
7256   ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp,
7257                                   long length);
7258   extern ASN1_INTEGER *ASN1_INTEGER_dup(const ASN1_INTEGER *a);
7259   int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y);
7260   
7261   extern ASN1_ENUMERATED *ASN1_ENUMERATED_new(void); extern void ASN1_ENUMERATED_free(ASN1_ENUMERATED *a); extern ASN1_ENUMERATED *d2i_ASN1_ENUMERATED(ASN1_ENUMERATED **a, const unsigned char **in, long len); extern int i2d_ASN1_ENUMERATED(const ASN1_ENUMERATED *a, unsigned char **out); extern const ASN1_ITEM * ASN1_ENUMERATED_it(void);
7262   
7263   int ASN1_UTCTIME_check(const ASN1_UTCTIME *a);
7264   ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t);
7265   ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
7266                                  int offset_day, long offset_sec);
7267   int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str);
7268   int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
7269   
7270   int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a);
7271   ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
7272                                                  time_t t);
7273   ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
7274                                                  time_t t, int offset_day,
7275                                                  long offset_sec);
7276   int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str);
7277   
7278   int ASN1_TIME_diff(int *pday, int *psec,
7279                      const ASN1_TIME *from, const ASN1_TIME *to);
7280   
7281   extern ASN1_OCTET_STRING *ASN1_OCTET_STRING_new(void); extern void ASN1_OCTET_STRING_free(ASN1_OCTET_STRING *a); extern ASN1_OCTET_STRING *d2i_ASN1_OCTET_STRING(ASN1_OCTET_STRING **a, const unsigned char **in, long len); extern int i2d_ASN1_OCTET_STRING(const ASN1_OCTET_STRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_OCTET_STRING_it(void);
7282   extern ASN1_OCTET_STRING *ASN1_OCTET_STRING_dup(const ASN1_OCTET_STRING *a);
7283   int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a,
7284                             const ASN1_OCTET_STRING *b);
7285   int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data,
7286                             int len);
7287   
7288   struct stack_st_ASN1_UTF8STRING; typedef int (*sk_ASN1_UTF8STRING_compfunc)(const ASN1_UTF8STRING * const *a, const ASN1_UTF8STRING *const *b); typedef void (*sk_ASN1_UTF8STRING_freefunc)(ASN1_UTF8STRING *a); typedef ASN1_UTF8STRING * (*sk_ASN1_UTF8STRING_copyfunc)(const ASN1_UTF8STRING *a); static __attribute__((unused)) inline ASN1_UTF8STRING *ossl_check_ASN1_UTF8STRING_type(ASN1_UTF8STRING *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_ASN1_UTF8STRING_sk_type(const struct stack_st_ASN1_UTF8STRING *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_ASN1_UTF8STRING_sk_type(struct stack_st_ASN1_UTF8STRING *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_ASN1_UTF8STRING_compfunc_type(sk_ASN1_UTF8STRING_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_ASN1_UTF8STRING_copyfunc_type(sk_ASN1_UTF8STRING_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_ASN1_UTF8STRING_freefunc_type(sk_ASN1_UTF8STRING_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
7289   # 790 "include/openssl/asn1.h"
7290   extern ASN1_VISIBLESTRING *ASN1_VISIBLESTRING_new(void); extern void ASN1_VISIBLESTRING_free(ASN1_VISIBLESTRING *a); extern ASN1_VISIBLESTRING *d2i_ASN1_VISIBLESTRING(ASN1_VISIBLESTRING **a, const unsigned char **in, long len); extern int i2d_ASN1_VISIBLESTRING(const ASN1_VISIBLESTRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_VISIBLESTRING_it(void);
7291   extern ASN1_UNIVERSALSTRING *ASN1_UNIVERSALSTRING_new(void); extern void ASN1_UNIVERSALSTRING_free(ASN1_UNIVERSALSTRING *a); extern ASN1_UNIVERSALSTRING *d2i_ASN1_UNIVERSALSTRING(ASN1_UNIVERSALSTRING **a, const unsigned char **in, long len); extern int i2d_ASN1_UNIVERSALSTRING(const ASN1_UNIVERSALSTRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_UNIVERSALSTRING_it(void);
7292   extern ASN1_UTF8STRING *ASN1_UTF8STRING_new(void); extern void ASN1_UTF8STRING_free(ASN1_UTF8STRING *a); extern ASN1_UTF8STRING *d2i_ASN1_UTF8STRING(ASN1_UTF8STRING **a, const unsigned char **in, long len); extern int i2d_ASN1_UTF8STRING(const ASN1_UTF8STRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_UTF8STRING_it(void);
7293   extern ASN1_NULL *ASN1_NULL_new(void); extern void ASN1_NULL_free(ASN1_NULL *a); extern ASN1_NULL *d2i_ASN1_NULL(ASN1_NULL **a, const unsigned char **in, long len); extern int i2d_ASN1_NULL(const ASN1_NULL *a, unsigned char **out); extern const ASN1_ITEM * ASN1_NULL_it(void);
7294   extern ASN1_BMPSTRING *ASN1_BMPSTRING_new(void); extern void ASN1_BMPSTRING_free(ASN1_BMPSTRING *a); extern ASN1_BMPSTRING *d2i_ASN1_BMPSTRING(ASN1_BMPSTRING **a, const unsigned char **in, long len); extern int i2d_ASN1_BMPSTRING(const ASN1_BMPSTRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_BMPSTRING_it(void);
7295   
7296   int UTF8_getc(const unsigned char *str, int len, unsigned long *val);
7297   int UTF8_putc(unsigned char *str, int len, unsigned long value);
7298   
7299   struct stack_st_ASN1_GENERALSTRING; typedef int (*sk_ASN1_GENERALSTRING_compfunc)(const ASN1_GENERALSTRING * const *a, const ASN1_GENERALSTRING *const *b); typedef void (*sk_ASN1_GENERALSTRING_freefunc)(ASN1_GENERALSTRING *a); typedef ASN1_GENERALSTRING * (*sk_ASN1_GENERALSTRING_copyfunc)(const ASN1_GENERALSTRING *a); static __attribute__((unused)) inline ASN1_GENERALSTRING *ossl_check_ASN1_GENERALSTRING_type(ASN1_GENERALSTRING *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_ASN1_GENERALSTRING_sk_type(const struct stack_st_ASN1_GENERALSTRING *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_ASN1_GENERALSTRING_sk_type(struct stack_st_ASN1_GENERALSTRING *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_ASN1_GENERALSTRING_compfunc_type(sk_ASN1_GENERALSTRING_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_ASN1_GENERALSTRING_copyfunc_type(sk_ASN1_GENERALSTRING_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_ASN1_GENERALSTRING_freefunc_type(sk_ASN1_GENERALSTRING_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
7300   # 827 "include/openssl/asn1.h"
7301   extern ASN1_STRING *ASN1_PRINTABLE_new(void); extern void ASN1_PRINTABLE_free(ASN1_STRING *a); extern ASN1_STRING *d2i_ASN1_PRINTABLE(ASN1_STRING **a, const unsigned char **in, long len); extern int i2d_ASN1_PRINTABLE(const ASN1_STRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_PRINTABLE_it(void);
7302   
7303   extern ASN1_STRING *DIRECTORYSTRING_new(void); extern void DIRECTORYSTRING_free(ASN1_STRING *a); extern ASN1_STRING *d2i_DIRECTORYSTRING(ASN1_STRING **a, const unsigned char **in, long len); extern int i2d_DIRECTORYSTRING(const ASN1_STRING *a, unsigned char **out); extern const ASN1_ITEM * DIRECTORYSTRING_it(void);
7304   extern ASN1_STRING *DISPLAYTEXT_new(void); extern void DISPLAYTEXT_free(ASN1_STRING *a); extern ASN1_STRING *d2i_DISPLAYTEXT(ASN1_STRING **a, const unsigned char **in, long len); extern int i2d_DISPLAYTEXT(const ASN1_STRING *a, unsigned char **out); extern const ASN1_ITEM * DISPLAYTEXT_it(void);
7305   extern ASN1_PRINTABLESTRING *ASN1_PRINTABLESTRING_new(void); extern void ASN1_PRINTABLESTRING_free(ASN1_PRINTABLESTRING *a); extern ASN1_PRINTABLESTRING *d2i_ASN1_PRINTABLESTRING(ASN1_PRINTABLESTRING **a, const unsigned char **in, long len); extern int i2d_ASN1_PRINTABLESTRING(const ASN1_PRINTABLESTRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_PRINTABLESTRING_it(void);
7306   extern ASN1_T61STRING *ASN1_T61STRING_new(void); extern void ASN1_T61STRING_free(ASN1_T61STRING *a); extern ASN1_T61STRING *d2i_ASN1_T61STRING(ASN1_T61STRING **a, const unsigned char **in, long len); extern int i2d_ASN1_T61STRING(const ASN1_T61STRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_T61STRING_it(void);
7307   extern ASN1_IA5STRING *ASN1_IA5STRING_new(void); extern void ASN1_IA5STRING_free(ASN1_IA5STRING *a); extern ASN1_IA5STRING *d2i_ASN1_IA5STRING(ASN1_IA5STRING **a, const unsigned char **in, long len); extern int i2d_ASN1_IA5STRING(const ASN1_IA5STRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_IA5STRING_it(void);
7308   extern ASN1_GENERALSTRING *ASN1_GENERALSTRING_new(void); extern void ASN1_GENERALSTRING_free(ASN1_GENERALSTRING *a); extern ASN1_GENERALSTRING *d2i_ASN1_GENERALSTRING(ASN1_GENERALSTRING **a, const unsigned char **in, long len); extern int i2d_ASN1_GENERALSTRING(const ASN1_GENERALSTRING *a, unsigned char **out); extern const ASN1_ITEM * ASN1_GENERALSTRING_it(void);
7309   extern ASN1_UTCTIME *ASN1_UTCTIME_new(void); extern void ASN1_UTCTIME_free(ASN1_UTCTIME *a); extern ASN1_UTCTIME *d2i_ASN1_UTCTIME(ASN1_UTCTIME **a, const unsigned char **in, long len); extern int i2d_ASN1_UTCTIME(const ASN1_UTCTIME *a, unsigned char **out); extern const ASN1_ITEM * ASN1_UTCTIME_it(void);
7310   extern ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_new(void); extern void ASN1_GENERALIZEDTIME_free(ASN1_GENERALIZEDTIME *a); extern ASN1_GENERALIZEDTIME *d2i_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME **a, const unsigned char **in, long len); extern int i2d_ASN1_GENERALIZEDTIME(const ASN1_GENERALIZEDTIME *a, unsigned char **out); extern const ASN1_ITEM * ASN1_GENERALIZEDTIME_it(void);
7311   extern ASN1_TIME *ASN1_TIME_new(void); extern void ASN1_TIME_free(ASN1_TIME *a); extern ASN1_TIME *d2i_ASN1_TIME(ASN1_TIME **a, const unsigned char **in, long len); extern int i2d_ASN1_TIME(const ASN1_TIME *a, unsigned char **out); extern const ASN1_ITEM * ASN1_TIME_it(void);
7312   
7313   extern ASN1_TIME *ASN1_TIME_dup(const ASN1_TIME *a);
7314   extern ASN1_UTCTIME *ASN1_UTCTIME_dup(const ASN1_UTCTIME *a);
7315   extern ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_dup(const ASN1_GENERALIZEDTIME *a);
7316   
7317   extern const ASN1_ITEM * ASN1_OCTET_STRING_NDEF_it(void);
7318   
7319   ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t);
7320   ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t,
7321                            int offset_day, long offset_sec);
7322   int ASN1_TIME_check(const ASN1_TIME *t);
7323   ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(const ASN1_TIME *t,
7324                                                      ASN1_GENERALIZEDTIME **out);
7325   int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
7326   int ASN1_TIME_set_string_X509(ASN1_TIME *s, const char *str);
7327   int ASN1_TIME_to_tm(const ASN1_TIME *s, struct tm *tm);
7328   int ASN1_TIME_normalize(ASN1_TIME *s);
7329   int ASN1_TIME_cmp_time_t(const ASN1_TIME *s, time_t t);
7330   int ASN1_TIME_compare(const ASN1_TIME *a, const ASN1_TIME *b);
7331   
7332   int i2a_ASN1_INTEGER(BIO *bp, const ASN1_INTEGER *a);
7333   int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size);
7334   int i2a_ASN1_ENUMERATED(BIO *bp, const ASN1_ENUMERATED *a);
7335   int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size);
7336   int i2a_ASN1_OBJECT(BIO *bp, const ASN1_OBJECT *a);
7337   int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size);
7338   int i2a_ASN1_STRING(BIO *bp, const ASN1_STRING *a, int type);
7339   int i2t_ASN1_OBJECT(char *buf, int buf_len, const ASN1_OBJECT *a);
7340   
7341   int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num);
7342   ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len,
7343                                   const char *sn, const char *ln);
7344   
7345   int ASN1_INTEGER_get_int64(int64_t *pr, const ASN1_INTEGER *a);
7346   int ASN1_INTEGER_set_int64(ASN1_INTEGER *a, int64_t r);
7347   int ASN1_INTEGER_get_uint64(uint64_t *pr, const ASN1_INTEGER *a);
7348   int ASN1_INTEGER_set_uint64(ASN1_INTEGER *a, uint64_t r);
7349   
7350   int ASN1_INTEGER_set(ASN1_INTEGER *a, long v);
7351   long ASN1_INTEGER_get(const ASN1_INTEGER *a);
7352   ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai);
7353   BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn);
7354   
7355   int ASN1_ENUMERATED_get_int64(int64_t *pr, const ASN1_ENUMERATED *a);
7356   int ASN1_ENUMERATED_set_int64(ASN1_ENUMERATED *a, int64_t r);
7357   
7358   
7359   int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);
7360   long ASN1_ENUMERATED_get(const ASN1_ENUMERATED *a);
7361   ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(const BIGNUM *bn, ASN1_ENUMERATED *ai);
7362   BIGNUM *ASN1_ENUMERATED_to_BN(const ASN1_ENUMERATED *ai, BIGNUM *bn);
7363   
7364   
7365   
7366   int ASN1_PRINTABLE_type(const unsigned char *s, int max);
7367   
7368   unsigned long ASN1_tag2bit(int tag);
7369   
7370   
7371   int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
7372                       int *pclass, long omax);
7373   int ASN1_check_infinite_end(unsigned char **p, long len);
7374   int ASN1_const_check_infinite_end(const unsigned char **p, long len);
7375   void ASN1_put_object(unsigned char **pp, int constructed, int length,
7376                        int tag, int xclass);
7377   int ASN1_put_eoc(unsigned char **pp);
7378   int ASN1_object_size(int constructed, int length, int tag);
7379   
7380   
7381   void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, const void *x);
7382   
7383   
7384   
7385   
7386   
7387   
7388   void *ASN1_item_dup(const ASN1_ITEM *it, const void *x);
7389   int ASN1_item_sign_ex(const ASN1_ITEM *it, X509_ALGOR *algor1,
7390                         X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
7391                         const void *data, const ASN1_OCTET_STRING *id,
7392                         EVP_PKEY *pkey, const EVP_MD *md, OSSL_LIB_CTX *libctx,
7393                         const char *propq);
7394   int ASN1_item_verify_ex(const ASN1_ITEM *it, const X509_ALGOR *alg,
7395                           const ASN1_BIT_STRING *signature, const void *data,
7396                           const ASN1_OCTET_STRING *id, EVP_PKEY *pkey,
7397                           OSSL_LIB_CTX *libctx, const char *propq);
7398   # 932 "include/openssl/asn1.h"
7399   void *ASN1_d2i_fp(void *(*xnew) (void), d2i_of_void *d2i, FILE *in, void **x);
7400   
7401   
7402   
7403   
7404   
7405   
7406   
7407   void *ASN1_item_d2i_fp_ex(const ASN1_ITEM *it, FILE *in, void *x,
7408                             OSSL_LIB_CTX *libctx, const char *propq);
7409   void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x);
7410   int ASN1_i2d_fp(i2d_of_void *i2d, FILE *out, const void *x);
7411   
7412   
7413   
7414   
7415   
7416   
7417   int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, const void *x);
7418   int ASN1_STRING_print_ex_fp(FILE *fp, const ASN1_STRING *str, unsigned long flags);
7419   
7420   
7421   int ASN1_STRING_to_UTF8(unsigned char **out, const ASN1_STRING *in);
7422   
7423   void *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x);
7424   
7425   
7426   
7427   
7428   
7429   
7430   
7431   void *ASN1_item_d2i_bio_ex(const ASN1_ITEM *it, BIO *in, void *pval,
7432                              OSSL_LIB_CTX *libctx, const char *propq);
7433   void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *pval);
7434   int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, const void *x);
7435   
7436   
7437   
7438   
7439   
7440   
7441   int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, const void *x);
7442   BIO *ASN1_item_i2d_mem_bio(const ASN1_ITEM *it, const ASN1_VALUE *val);
7443   int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a);
7444   int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);
7445   int ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm);
7446   int ASN1_TIME_print_ex(BIO *bp, const ASN1_TIME *tm, unsigned long flags);
7447   int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v);
7448   int ASN1_STRING_print_ex(BIO *out, const ASN1_STRING *str, unsigned long flags);
7449   int ASN1_buf_print(BIO *bp, const unsigned char *buf, size_t buflen, int off);
7450   int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
7451                     unsigned char *buf, int off);
7452   int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent);
7453   int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent,
7454                       int dump);
7455   const char *ASN1_tag2str(int tag);
7456   
7457   
7458   
7459   int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
7460   
7461   int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len);
7462   int ASN1_TYPE_get_octetstring(const ASN1_TYPE *a, unsigned char *data, int max_len);
7463   int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num,
7464                                     unsigned char *data, int len);
7465   int ASN1_TYPE_get_int_octetstring(const ASN1_TYPE *a, long *num,
7466                                     unsigned char *data, int max_len);
7467   
7468   void *ASN1_item_unpack(const ASN1_STRING *oct, const ASN1_ITEM *it);
7469   void *ASN1_item_unpack_ex(const ASN1_STRING *oct, const ASN1_ITEM *it,
7470                             OSSL_LIB_CTX *libctx, const char *propq);
7471   
7472   ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it,
7473                               ASN1_OCTET_STRING **oct);
7474   
7475   void ASN1_STRING_set_default_mask(unsigned long mask);
7476   int ASN1_STRING_set_default_mask_asc(const char *p);
7477   unsigned long ASN1_STRING_get_default_mask(void);
7478   int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,
7479                          int inform, unsigned long mask);
7480   int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
7481                           int inform, unsigned long mask,
7482                           long minsize, long maxsize);
7483   
7484   ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,
7485                                       const unsigned char *in, int inlen,
7486                                       int inform, int nid);
7487   ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
7488   int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long);
7489   void ASN1_STRING_TABLE_cleanup(void);
7490   
7491   
7492   
7493   
7494   ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);
7495   ASN1_VALUE *ASN1_item_new_ex(const ASN1_ITEM *it, OSSL_LIB_CTX *libctx,
7496                                const char *propq);
7497   void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);
7498   ASN1_VALUE *ASN1_item_d2i_ex(ASN1_VALUE **val, const unsigned char **in,
7499                                long len, const ASN1_ITEM *it,
7500                                OSSL_LIB_CTX *libctx, const char *propq);
7501   ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in,
7502                             long len, const ASN1_ITEM *it);
7503   int ASN1_item_i2d(const ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
7504   int ASN1_item_ndef_i2d(const ASN1_VALUE *val, unsigned char **out,
7505                          const ASN1_ITEM *it);
7506   
7507   void ASN1_add_oid_module(void);
7508   void ASN1_add_stable_module(void);
7509   
7510   ASN1_TYPE *ASN1_generate_nconf(const char *str, CONF *nconf);
7511   ASN1_TYPE *ASN1_generate_v3(const char *str, X509V3_CTX *cnf);
7512   int ASN1_str2mask(const char *str, unsigned long *pmask);
7513   # 1068 "include/openssl/asn1.h"
7514   int ASN1_item_print(BIO *out, const ASN1_VALUE *ifld, int indent,
7515                       const ASN1_ITEM *it, const ASN1_PCTX *pctx);
7516   ASN1_PCTX *ASN1_PCTX_new(void);
7517   void ASN1_PCTX_free(ASN1_PCTX *p);
7518   unsigned long ASN1_PCTX_get_flags(const ASN1_PCTX *p);
7519   void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags);
7520   unsigned long ASN1_PCTX_get_nm_flags(const ASN1_PCTX *p);
7521   void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags);
7522   unsigned long ASN1_PCTX_get_cert_flags(const ASN1_PCTX *p);
7523   void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags);
7524   unsigned long ASN1_PCTX_get_oid_flags(const ASN1_PCTX *p);
7525   void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags);
7526   unsigned long ASN1_PCTX_get_str_flags(const ASN1_PCTX *p);
7527   void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags);
7528   
7529   ASN1_SCTX *ASN1_SCTX_new(int (*scan_cb) (ASN1_SCTX *ctx));
7530   void ASN1_SCTX_free(ASN1_SCTX *p);
7531   const ASN1_ITEM *ASN1_SCTX_get_item(ASN1_SCTX *p);
7532   const ASN1_TEMPLATE *ASN1_SCTX_get_template(ASN1_SCTX *p);
7533   unsigned long ASN1_SCTX_get_flags(ASN1_SCTX *p);
7534   void ASN1_SCTX_set_app_data(ASN1_SCTX *p, void *data);
7535   void *ASN1_SCTX_get_app_data(ASN1_SCTX *p);
7536   
7537   const BIO_METHOD *BIO_f_asn1(void);
7538   
7539   
7540   BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
7541   
7542   int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
7543                           const ASN1_ITEM *it);
7544   int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
7545                                 const char *hdr, const ASN1_ITEM *it);
7546   
7547   int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
7548                        int ctype_nid, int econt_nid,
7549                        struct stack_st_X509_ALGOR *mdalgs, const ASN1_ITEM *it);
7550   int SMIME_write_ASN1_ex(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
7551                           int ctype_nid, int econt_nid,
7552                           struct stack_st_X509_ALGOR *mdalgs, const ASN1_ITEM *it,
7553                           OSSL_LIB_CTX *libctx, const char *propq);
7554   ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it);
7555   ASN1_VALUE *SMIME_read_ASN1_ex(BIO *bio, int flags, BIO **bcont,
7556                                  const ASN1_ITEM *it, ASN1_VALUE **x,
7557                                  OSSL_LIB_CTX *libctx, const char *propq);
7558   int SMIME_crlf_copy(BIO *in, BIO *out, int flags);
7559   int SMIME_text(BIO *in, BIO *out);
7560   
7561   const ASN1_ITEM *ASN1_ITEM_lookup(const char *name);
7562   const ASN1_ITEM *ASN1_ITEM_get(size_t i);
7563   # 27 "include/openssl/dsa.h" 2
7564   
7565   
7566   
7567   
7568   # 1 "include/openssl/dh.h" 1
7569   # 12 "include/openssl/dh.h"
7570           
7571   
7572   
7573   
7574   
7575   
7576   
7577   
7578   # 1 "include/openssl/types.h" 1
7579   # 21 "include/openssl/dh.h" 2
7580   # 38 "include/openssl/dh.h"
7581   int EVP_PKEY_CTX_set_dh_paramgen_type(EVP_PKEY_CTX *ctx, int typ);
7582   int EVP_PKEY_CTX_set_dh_paramgen_gindex(EVP_PKEY_CTX *ctx, int gindex);
7583   int EVP_PKEY_CTX_set_dh_paramgen_seed(EVP_PKEY_CTX *ctx,
7584                                         const unsigned char *seed,
7585                                         size_t seedlen);
7586   int EVP_PKEY_CTX_set_dh_paramgen_prime_len(EVP_PKEY_CTX *ctx, int pbits);
7587   int EVP_PKEY_CTX_set_dh_paramgen_subprime_len(EVP_PKEY_CTX *ctx, int qlen);
7588   int EVP_PKEY_CTX_set_dh_paramgen_generator(EVP_PKEY_CTX *ctx, int gen);
7589   int EVP_PKEY_CTX_set_dh_nid(EVP_PKEY_CTX *ctx, int nid);
7590   int EVP_PKEY_CTX_set_dh_rfc5114(EVP_PKEY_CTX *ctx, int gen);
7591   int EVP_PKEY_CTX_set_dhx_rfc5114(EVP_PKEY_CTX *ctx, int gen);
7592   int EVP_PKEY_CTX_set_dh_pad(EVP_PKEY_CTX *ctx, int pad);
7593   
7594   int EVP_PKEY_CTX_set_dh_kdf_type(EVP_PKEY_CTX *ctx, int kdf);
7595   int EVP_PKEY_CTX_get_dh_kdf_type(EVP_PKEY_CTX *ctx);
7596   int EVP_PKEY_CTX_set0_dh_kdf_oid(EVP_PKEY_CTX *ctx, ASN1_OBJECT *oid);
7597   int EVP_PKEY_CTX_get0_dh_kdf_oid(EVP_PKEY_CTX *ctx, ASN1_OBJECT **oid);
7598   int EVP_PKEY_CTX_set_dh_kdf_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
7599   int EVP_PKEY_CTX_get_dh_kdf_md(EVP_PKEY_CTX *ctx, const EVP_MD **md);
7600   int EVP_PKEY_CTX_set_dh_kdf_outlen(EVP_PKEY_CTX *ctx, int len);
7601   int EVP_PKEY_CTX_get_dh_kdf_outlen(EVP_PKEY_CTX *ctx, int *len);
7602   int EVP_PKEY_CTX_set0_dh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char *ukm, int len);
7603   
7604   __attribute__((deprecated("Since OpenSSL " "3.0")))
7605   int EVP_PKEY_CTX_get0_dh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char **ukm);
7606   # 96 "include/openssl/dh.h"
7607   # 1 "include/openssl/dherr.h" 1
7608   # 13 "include/openssl/dherr.h"
7609           
7610   # 97 "include/openssl/dh.h" 2
7611   # 144 "include/openssl/dh.h"
7612   extern const ASN1_ITEM * DHparams_it(void);
7613   # 201 "include/openssl/dh.h"
7614   __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *DHparams_dup(const DH *a);
7615   
7616   __attribute__((deprecated("Since OpenSSL " "3.0"))) const DH_METHOD *DH_OpenSSL(void);
7617   
7618   __attribute__((deprecated("Since OpenSSL " "3.0"))) void DH_set_default_method(const DH_METHOD *meth);
7619   __attribute__((deprecated("Since OpenSSL " "3.0"))) const DH_METHOD *DH_get_default_method(void);
7620   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_set_method(DH *dh, const DH_METHOD *meth);
7621   __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *DH_new_method(ENGINE *engine);
7622   
7623   __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *DH_new(void);
7624   __attribute__((deprecated("Since OpenSSL " "3.0"))) void DH_free(DH *dh);
7625   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_up_ref(DH *dh);
7626   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_bits(const DH *dh);
7627   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_size(const DH *dh);
7628   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_security_bits(const DH *dh);
7629   
7630   
7631   
7632   
7633   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_set_ex_data(DH *d, int idx, void *arg);
7634   __attribute__((deprecated("Since OpenSSL " "3.0"))) void *DH_get_ex_data(const DH *d, int idx);
7635   
7636   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_generate_parameters_ex(DH *dh, int prime_len,
7637                                                       int generator,
7638                                                       BN_GENCB *cb);
7639   
7640   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_check_params_ex(const DH *dh);
7641   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_check_ex(const DH *dh);
7642   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key);
7643   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_check_params(const DH *dh, int *ret);
7644   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_check(const DH *dh, int *codes);
7645   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key,
7646                                              int *codes);
7647   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_generate_key(DH *dh);
7648   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_compute_key(unsigned char *key,
7649                                            const BIGNUM *pub_key, DH *dh);
7650   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_compute_key_padded(unsigned char *key,
7651                                                   const BIGNUM *pub_key, DH *dh);
7652   
7653   __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *d2i_DHparams(DH **a, const unsigned char **in, long len); __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_DHparams(const DH *a, unsigned char **out);
7654   __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *d2i_DHxparams(DH **a, const unsigned char **in, long len); __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_DHxparams(const DH *a, unsigned char **out);
7655   
7656   
7657   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DHparams_print_fp(FILE *fp, const DH *x);
7658   
7659   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DHparams_print(BIO *bp, const DH *x);
7660   
7661   
7662   __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *DH_get_1024_160(void);
7663   __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *DH_get_2048_224(void);
7664   __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *DH_get_2048_256(void);
7665   
7666   
7667   __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *DH_new_by_nid(int nid);
7668   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_get_nid(const DH *dh);
7669   
7670   
7671   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_KDF_X9_42(unsigned char *out, size_t outlen,
7672                                          const unsigned char *Z, size_t Zlen,
7673                                          ASN1_OBJECT *key_oid,
7674                                          const unsigned char *ukm,
7675                                          size_t ukmlen, const EVP_MD *md);
7676   
7677   __attribute__((deprecated("Since OpenSSL " "3.0"))) void DH_get0_pqg(const DH *dh, const BIGNUM **p,
7678                                          const BIGNUM **q, const BIGNUM **g);
7679   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
7680   __attribute__((deprecated("Since OpenSSL " "3.0"))) void DH_get0_key(const DH *dh, const BIGNUM **pub_key,
7681                                          const BIGNUM **priv_key);
7682   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
7683   __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *DH_get0_p(const DH *dh);
7684   __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *DH_get0_q(const DH *dh);
7685   __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *DH_get0_g(const DH *dh);
7686   __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *DH_get0_priv_key(const DH *dh);
7687   __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *DH_get0_pub_key(const DH *dh);
7688   __attribute__((deprecated("Since OpenSSL " "3.0"))) void DH_clear_flags(DH *dh, int flags);
7689   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_test_flags(const DH *dh, int flags);
7690   __attribute__((deprecated("Since OpenSSL " "3.0"))) void DH_set_flags(DH *dh, int flags);
7691   __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *DH_get0_engine(DH *d);
7692   __attribute__((deprecated("Since OpenSSL " "3.0"))) long DH_get_length(const DH *dh);
7693   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_set_length(DH *dh, long length);
7694   
7695   __attribute__((deprecated("Since OpenSSL " "3.0"))) DH_METHOD *DH_meth_new(const char *name, int flags);
7696   __attribute__((deprecated("Since OpenSSL " "3.0"))) void DH_meth_free(DH_METHOD *dhm);
7697   __attribute__((deprecated("Since OpenSSL " "3.0"))) DH_METHOD *DH_meth_dup(const DH_METHOD *dhm);
7698   __attribute__((deprecated("Since OpenSSL " "3.0"))) const char *DH_meth_get0_name(const DH_METHOD *dhm);
7699   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_meth_set1_name(DH_METHOD *dhm, const char *name);
7700   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_meth_get_flags(const DH_METHOD *dhm);
7701   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_meth_set_flags(DH_METHOD *dhm, int flags);
7702   __attribute__((deprecated("Since OpenSSL " "3.0"))) void *DH_meth_get0_app_data(const DH_METHOD *dhm);
7703   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_meth_set0_app_data(DH_METHOD *dhm, void *app_data);
7704   __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DH_meth_get_generate_key(const DH_METHOD *dhm)) (DH *);
7705   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_meth_set_generate_key(DH_METHOD *dhm,
7706                                                      int (*generate_key) (DH *));
7707   __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DH_meth_get_compute_key(const DH_METHOD *dhm))
7708                                                      (unsigned char *key,
7709                                                       const BIGNUM *pub_key,
7710                                                       DH *dh);
7711   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_meth_set_compute_key(DH_METHOD *dhm,
7712                                                     int (*compute_key)
7713                                                     (unsigned char *key,
7714                                                      const BIGNUM *pub_key,
7715                                                      DH *dh));
7716   __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DH_meth_get_bn_mod_exp(const DH_METHOD *dhm))
7717                                                      (const DH *, BIGNUM *,
7718                                                       const BIGNUM *,
7719                                                       const BIGNUM *,
7720                                                       const BIGNUM *, BN_CTX *,
7721                                                       BN_MONT_CTX *);
7722   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_meth_set_bn_mod_exp(DH_METHOD *dhm,
7723                                                    int (*bn_mod_exp)
7724                                                    (const DH *, BIGNUM *,
7725                                                     const BIGNUM *, const BIGNUM *,
7726                                                     const BIGNUM *, BN_CTX *,
7727                                                     BN_MONT_CTX *));
7728   __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DH_meth_get_init(const DH_METHOD *dhm))(DH *);
7729   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_meth_set_init(DH_METHOD *dhm, int (*init)(DH *));
7730   __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DH_meth_get_finish(const DH_METHOD *dhm)) (DH *);
7731   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_meth_set_finish(DH_METHOD *dhm, int (*finish) (DH *));
7732   __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DH_meth_get_generate_params(const DH_METHOD *dhm))
7733                                                           (DH *, int, int,
7734                                                            BN_GENCB *);
7735   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DH_meth_set_generate_params(DH_METHOD *dhm,
7736                                                         int (*generate_params)
7737                                                         (DH *, int, int,
7738                                                          BN_GENCB *));
7739   
7740   
7741   
7742   __attribute__((deprecated("Since OpenSSL " "0.9.8"))) DH *DH_generate_parameters(int prime_len, int generator,
7743                                                      void (*callback) (int, int,
7744                                                                   void *),
7745                                                      void *cb_arg);
7746   # 32 "include/openssl/dsa.h" 2
7747   
7748   # 1 "include/openssl/dsaerr.h" 1
7749   # 13 "include/openssl/dsaerr.h"
7750           
7751   # 34 "include/openssl/dsa.h" 2
7752   # 43 "include/openssl/dsa.h"
7753   int EVP_PKEY_CTX_set_dsa_paramgen_bits(EVP_PKEY_CTX *ctx, int nbits);
7754   int EVP_PKEY_CTX_set_dsa_paramgen_q_bits(EVP_PKEY_CTX *ctx, int qbits);
7755   int EVP_PKEY_CTX_set_dsa_paramgen_md_props(EVP_PKEY_CTX *ctx,
7756                                              const char *md_name,
7757                                              const char *md_properties);
7758   int EVP_PKEY_CTX_set_dsa_paramgen_gindex(EVP_PKEY_CTX *ctx, int gindex);
7759   int EVP_PKEY_CTX_set_dsa_paramgen_type(EVP_PKEY_CTX *ctx, const char *name);
7760   int EVP_PKEY_CTX_set_dsa_paramgen_seed(EVP_PKEY_CTX *ctx,
7761                                          const unsigned char *seed,
7762                                          size_t seedlen);
7763   int EVP_PKEY_CTX_set_dsa_paramgen_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
7764   # 66 "include/openssl/dsa.h"
7765   typedef struct DSA_SIG_st DSA_SIG;
7766   DSA_SIG *DSA_SIG_new(void);
7767   void DSA_SIG_free(DSA_SIG *a);
7768   extern DSA_SIG *d2i_DSA_SIG(DSA_SIG **a, const unsigned char **in, long len); extern int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **out);
7769   void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
7770   int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s);
7771   # 117 "include/openssl/dsa.h"
7772   __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *DSAparams_dup(const DSA *a);
7773   __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen,
7774                                              DSA *dsa);
7775   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_do_verify(const unsigned char *dgst, int dgst_len,
7776                                           DSA_SIG *sig, DSA *dsa);
7777   
7778   __attribute__((deprecated("Since OpenSSL " "3.0"))) const DSA_METHOD *DSA_OpenSSL(void);
7779   
7780   __attribute__((deprecated("Since OpenSSL " "3.0"))) void DSA_set_default_method(const DSA_METHOD *);
7781   __attribute__((deprecated("Since OpenSSL " "3.0"))) const DSA_METHOD *DSA_get_default_method(void);
7782   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_set_method(DSA *dsa, const DSA_METHOD *);
7783   __attribute__((deprecated("Since OpenSSL " "3.0"))) const DSA_METHOD *DSA_get_method(DSA *d);
7784   
7785   __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *DSA_new(void);
7786   __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *DSA_new_method(ENGINE *engine);
7787   __attribute__((deprecated("Since OpenSSL " "3.0"))) void DSA_free(DSA *r);
7788   
7789   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_up_ref(DSA *r);
7790   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_size(const DSA *);
7791   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_bits(const DSA *d);
7792   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_security_bits(const DSA *d);
7793   
7794   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in,
7795                                            BIGNUM **kinvp, BIGNUM **rp);
7796   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_sign(int type, const unsigned char *dgst,
7797                                      int dlen, unsigned char *sig,
7798                                      unsigned int *siglen, DSA *dsa);
7799   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_verify(int type, const unsigned char *dgst,
7800                                        int dgst_len, const unsigned char *sigbuf,
7801                                        int siglen, DSA *dsa);
7802   
7803   
7804   
7805   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_set_ex_data(DSA *d, int idx, void *arg);
7806   __attribute__((deprecated("Since OpenSSL " "3.0"))) void *DSA_get_ex_data(const DSA *d, int idx);
7807   
7808   __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *d2i_DSAPublicKey(DSA **a, const unsigned char **in, long len); __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_DSAPublicKey(const DSA *a, unsigned char **out);
7809   
7810   __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *d2i_DSAPrivateKey(DSA **a, const unsigned char **in, long len); __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_DSAPrivateKey(const DSA *a, unsigned char **out);
7811   
7812   __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *d2i_DSAparams(DSA **a, const unsigned char **in, long len); __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_DSAparams(const DSA *a, unsigned char **out);
7813   
7814   
7815   
7816   
7817   
7818   __attribute__((deprecated("Since OpenSSL " "0.9.8")))
7819   DSA *DSA_generate_parameters(int bits, unsigned char *seed, int seed_len,
7820                                int *counter_ret, unsigned long *h_ret,
7821                                void (*callback) (int, int, void *),
7822                                void *cb_arg);
7823   
7824   
7825   
7826   
7827   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_generate_parameters_ex(DSA *dsa, int bits,
7828                                                        const unsigned char *seed,
7829                                                        int seed_len,
7830                                                        int *counter_ret,
7831                                                        unsigned long *h_ret,
7832                                                        BN_GENCB *cb);
7833   
7834   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_generate_key(DSA *a);
7835   
7836   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSAparams_print(BIO *bp, const DSA *x);
7837   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_print(BIO *bp, const DSA *x, int off);
7838   
7839   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSAparams_print_fp(FILE *fp, const DSA *x);
7840   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_print_fp(FILE *bp, const DSA *x, int off);
7841   # 203 "include/openssl/dsa.h"
7842   __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *DSA_dup_DH(const DSA *r);
7843   
7844   
7845   __attribute__((deprecated("Since OpenSSL " "3.0"))) void DSA_get0_pqg(const DSA *d, const BIGNUM **p,
7846                                           const BIGNUM **q, const BIGNUM **g);
7847   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g);
7848   __attribute__((deprecated("Since OpenSSL " "3.0"))) void DSA_get0_key(const DSA *d, const BIGNUM **pub_key,
7849                                           const BIGNUM **priv_key);
7850   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_set0_key(DSA *d, BIGNUM *pub_key,
7851                                          BIGNUM *priv_key);
7852   __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *DSA_get0_p(const DSA *d);
7853   __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *DSA_get0_q(const DSA *d);
7854   __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *DSA_get0_g(const DSA *d);
7855   __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *DSA_get0_pub_key(const DSA *d);
7856   __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *DSA_get0_priv_key(const DSA *d);
7857   __attribute__((deprecated("Since OpenSSL " "3.0"))) void DSA_clear_flags(DSA *d, int flags);
7858   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_test_flags(const DSA *d, int flags);
7859   __attribute__((deprecated("Since OpenSSL " "3.0"))) void DSA_set_flags(DSA *d, int flags);
7860   __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *DSA_get0_engine(DSA *d);
7861   
7862   __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA_METHOD *DSA_meth_new(const char *name, int flags);
7863   __attribute__((deprecated("Since OpenSSL " "3.0"))) void DSA_meth_free(DSA_METHOD *dsam);
7864   __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA_METHOD *DSA_meth_dup(const DSA_METHOD *dsam);
7865   __attribute__((deprecated("Since OpenSSL " "3.0"))) const char *DSA_meth_get0_name(const DSA_METHOD *dsam);
7866   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set1_name(DSA_METHOD *dsam,
7867                                                const char *name);
7868   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_get_flags(const DSA_METHOD *dsam);
7869   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set_flags(DSA_METHOD *dsam, int flags);
7870   __attribute__((deprecated("Since OpenSSL " "3.0"))) void *DSA_meth_get0_app_data(const DSA_METHOD *dsam);
7871   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set0_app_data(DSA_METHOD *dsam,
7872                                                    void *app_data);
7873   __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA_SIG *(*DSA_meth_get_sign(const DSA_METHOD *dsam))
7874           (const unsigned char *, int, DSA *);
7875   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set_sign(DSA_METHOD *dsam,
7876                          DSA_SIG *(*sign) (const unsigned char *, int, DSA *));
7877   __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DSA_meth_get_sign_setup(const DSA_METHOD *dsam))
7878           (DSA *, BN_CTX *, BIGNUM **, BIGNUM **);
7879   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set_sign_setup(DSA_METHOD *dsam,
7880           int (*sign_setup) (DSA *, BN_CTX *, BIGNUM **, BIGNUM **));
7881   __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DSA_meth_get_verify(const DSA_METHOD *dsam))
7882           (const unsigned char *, int, DSA_SIG *, DSA *);
7883   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set_verify(DSA_METHOD *dsam,
7884       int (*verify) (const unsigned char *, int, DSA_SIG *, DSA *));
7885   __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DSA_meth_get_mod_exp(const DSA_METHOD *dsam))
7886           (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *,
7887            const BIGNUM *, const BIGNUM *, BN_CTX *, BN_MONT_CTX *);
7888   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set_mod_exp(DSA_METHOD *dsam,
7889       int (*mod_exp) (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *,
7890                       const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *,
7891                       BN_MONT_CTX *));
7892   __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DSA_meth_get_bn_mod_exp(const DSA_METHOD *dsam))
7893       (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *,
7894        BN_CTX *, BN_MONT_CTX *);
7895   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set_bn_mod_exp(DSA_METHOD *dsam,
7896       int (*bn_mod_exp) (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *,
7897                          const BIGNUM *, BN_CTX *, BN_MONT_CTX *));
7898   __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DSA_meth_get_init(const DSA_METHOD *dsam))(DSA *);
7899   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set_init(DSA_METHOD *dsam,
7900                                               int (*init)(DSA *));
7901   __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DSA_meth_get_finish(const DSA_METHOD *dsam))(DSA *);
7902   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set_finish(DSA_METHOD *dsam,
7903                                                 int (*finish)(DSA *));
7904   __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DSA_meth_get_paramgen(const DSA_METHOD *dsam))
7905           (DSA *, int, const unsigned char *, int, int *, unsigned long *,
7906            BN_GENCB *);
7907   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set_paramgen(DSA_METHOD *dsam,
7908           int (*paramgen) (DSA *, int, const unsigned char *, int, int *,
7909                            unsigned long *, BN_GENCB *));
7910   __attribute__((deprecated("Since OpenSSL " "3.0"))) int (*DSA_meth_get_keygen(const DSA_METHOD *dsam))(DSA *);
7911   __attribute__((deprecated("Since OpenSSL " "3.0"))) int DSA_meth_set_keygen(DSA_METHOD *dsam,
7912                                                 int (*keygen) (DSA *));
7913   # 25 "ssl/ssl_local.h" 2
7914   # 1 "include/openssl/err.h" 1
7915   # 14 "include/openssl/err.h"
7916           
7917   # 28 "include/openssl/err.h"
7918   # 1 "include/openssl/types.h" 1
7919   # 29 "include/openssl/err.h" 2
7920   
7921   # 1 "include/openssl/lhash.h" 1
7922   # 18 "include/openssl/lhash.h"
7923           
7924   # 35 "include/openssl/lhash.h"
7925   typedef struct lhash_node_st OPENSSL_LH_NODE;
7926   typedef int (*OPENSSL_LH_COMPFUNC) (const void *, const void *);
7927   typedef int (*OPENSSL_LH_COMPFUNCTHUNK) (const void *, const void *, OPENSSL_LH_COMPFUNC cfn);
7928   typedef unsigned long (*OPENSSL_LH_HASHFUNC) (const void *);
7929   typedef unsigned long (*OPENSSL_LH_HASHFUNCTHUNK) (const void *, OPENSSL_LH_HASHFUNC hfn);
7930   typedef void (*OPENSSL_LH_DOALL_FUNC) (void *);
7931   typedef void (*OPENSSL_LH_DOALL_FUNC_THUNK) (void *, OPENSSL_LH_DOALL_FUNC doall);
7932   typedef void (*OPENSSL_LH_DOALL_FUNCARG) (void *, void *);
7933   typedef void (*OPENSSL_LH_DOALL_FUNCARG_THUNK) (void *, void *, OPENSSL_LH_DOALL_FUNCARG doall);
7934   typedef struct lhash_st OPENSSL_LHASH;
7935   # 87 "include/openssl/lhash.h"
7936   int OPENSSL_LH_error(OPENSSL_LHASH *lh);
7937   OPENSSL_LHASH *OPENSSL_LH_new(OPENSSL_LH_HASHFUNC h, OPENSSL_LH_COMPFUNC c);
7938   OPENSSL_LHASH *OPENSSL_LH_set_thunks(OPENSSL_LHASH *lh,
7939                                        OPENSSL_LH_HASHFUNCTHUNK hw,
7940                                        OPENSSL_LH_COMPFUNCTHUNK cw,
7941                                        OPENSSL_LH_DOALL_FUNC_THUNK daw,
7942                                        OPENSSL_LH_DOALL_FUNCARG_THUNK daaw);
7943   void OPENSSL_LH_free(OPENSSL_LHASH *lh);
7944   void OPENSSL_LH_flush(OPENSSL_LHASH *lh);
7945   void *OPENSSL_LH_insert(OPENSSL_LHASH *lh, void *data);
7946   void *OPENSSL_LH_delete(OPENSSL_LHASH *lh, const void *data);
7947   void *OPENSSL_LH_retrieve(OPENSSL_LHASH *lh, const void *data);
7948   void OPENSSL_LH_doall(OPENSSL_LHASH *lh, OPENSSL_LH_DOALL_FUNC func);
7949   void OPENSSL_LH_doall_arg(OPENSSL_LHASH *lh,
7950                             OPENSSL_LH_DOALL_FUNCARG func, void *arg);
7951   void OPENSSL_LH_doall_arg_thunk(OPENSSL_LHASH *lh,
7952                             OPENSSL_LH_DOALL_FUNCARG_THUNK daaw,
7953                             OPENSSL_LH_DOALL_FUNCARG fn, void *arg);
7954   
7955   unsigned long OPENSSL_LH_strhash(const char *c);
7956   unsigned long OPENSSL_LH_num_items(const OPENSSL_LHASH *lh);
7957   unsigned long OPENSSL_LH_get_down_load(const OPENSSL_LHASH *lh);
7958   void OPENSSL_LH_set_down_load(OPENSSL_LHASH *lh, unsigned long down_load);
7959   
7960   
7961   
7962   __attribute__((deprecated("Since OpenSSL " "3.1"))) void OPENSSL_LH_stats(const OPENSSL_LHASH *lh, FILE *fp);
7963   __attribute__((deprecated("Since OpenSSL " "3.1"))) void OPENSSL_LH_node_stats(const OPENSSL_LHASH *lh, FILE *fp);
7964   __attribute__((deprecated("Since OpenSSL " "3.1"))) void OPENSSL_LH_node_usage_stats(const OPENSSL_LHASH *lh, FILE *fp);
7965   
7966   
7967   
7968   __attribute__((deprecated("Since OpenSSL " "3.1"))) void OPENSSL_LH_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
7969   __attribute__((deprecated("Since OpenSSL " "3.1"))) void OPENSSL_LH_node_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
7970   __attribute__((deprecated("Since OpenSSL " "3.1"))) void OPENSSL_LH_node_usage_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
7971   # 362 "include/openssl/lhash.h"
7972   struct lhash_st_OPENSSL_STRING { union lh_OPENSSL_STRING_dummy { void* d1; unsigned long d2; int d3; } dummy; }; typedef int (*lh_OPENSSL_STRING_compfunc)(const OPENSSL_STRING *a, const OPENSSL_STRING *b); typedef unsigned long (*lh_OPENSSL_STRING_hashfunc)(const OPENSSL_STRING *a); typedef void (*lh_OPENSSL_STRING_doallfunc)(OPENSSL_STRING *a); static inline unsigned long lh_OPENSSL_STRING_hash_thunk(const void *data, OPENSSL_LH_HASHFUNC hfn) { unsigned long (*hfn_conv)(const OPENSSL_STRING *) = (unsigned long (*)(const OPENSSL_STRING *))hfn; return hfn_conv((const OPENSSL_STRING *)data); } static inline int lh_OPENSSL_STRING_comp_thunk(const void *da, const void *db, OPENSSL_LH_COMPFUNC cfn) { int (*cfn_conv)(const OPENSSL_STRING *, const OPENSSL_STRING *) = (int (*)(const OPENSSL_STRING *, const OPENSSL_STRING *))cfn; return cfn_conv((const OPENSSL_STRING *)da, (const OPENSSL_STRING *)db); } static inline void lh_OPENSSL_STRING_doall_thunk(void *node, OPENSSL_LH_DOALL_FUNC doall) { void (*doall_conv)(OPENSSL_STRING *) = (void (*)(OPENSSL_STRING *))doall; doall_conv((OPENSSL_STRING *)node); } static inline void lh_OPENSSL_STRING_doall_arg_thunk(void *node, void *arg, OPENSSL_LH_DOALL_FUNCARG doall) { void (*doall_conv)(OPENSSL_STRING *, void *) = (void (*)(OPENSSL_STRING *, void *))doall; doall_conv((OPENSSL_STRING *)node, arg); } static __attribute__((unused)) inline OPENSSL_STRING * ossl_check_OPENSSL_STRING_lh_plain_type(OPENSSL_STRING *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STRING * ossl_check_const_OPENSSL_STRING_lh_plain_type(const OPENSSL_STRING *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_LHASH * ossl_check_const_OPENSSL_STRING_lh_type(const struct lhash_st_OPENSSL_STRING *lh) { return (const OPENSSL_LHASH *)lh; } static __attribute__((unused)) inline OPENSSL_LHASH * ossl_check_OPENSSL_STRING_lh_type(struct lhash_st_OPENSSL_STRING *lh) { return (OPENSSL_LHASH *)lh; } static __attribute__((unused)) inline OPENSSL_LH_COMPFUNC ossl_check_OPENSSL_STRING_lh_compfunc_type(lh_OPENSSL_STRING_compfunc cmp) { return (OPENSSL_LH_COMPFUNC)cmp; } static __attribute__((unused)) inline OPENSSL_LH_HASHFUNC ossl_check_OPENSSL_STRING_lh_hashfunc_type(lh_OPENSSL_STRING_hashfunc hfn) { return (OPENSSL_LH_HASHFUNC)hfn; } static __attribute__((unused)) inline OPENSSL_LH_DOALL_FUNC ossl_check_OPENSSL_STRING_lh_doallfunc_type(lh_OPENSSL_STRING_doallfunc dfn) { return (OPENSSL_LH_DOALL_FUNC)dfn; } struct lhash_st_OPENSSL_STRING;
7973   # 377 "include/openssl/lhash.h"
7974   struct lhash_st_OPENSSL_CSTRING { union lh_OPENSSL_CSTRING_dummy { void* d1; unsigned long d2; int d3; } dummy; }; typedef int (*lh_OPENSSL_CSTRING_compfunc)(const OPENSSL_CSTRING *a, const OPENSSL_CSTRING *b); typedef unsigned long (*lh_OPENSSL_CSTRING_hashfunc)(const OPENSSL_CSTRING *a); typedef void (*lh_OPENSSL_CSTRING_doallfunc)(OPENSSL_CSTRING *a); static inline unsigned long lh_OPENSSL_CSTRING_hash_thunk(const void *data, OPENSSL_LH_HASHFUNC hfn) { unsigned long (*hfn_conv)(const OPENSSL_CSTRING *) = (unsigned long (*)(const OPENSSL_CSTRING *))hfn; return hfn_conv((const OPENSSL_CSTRING *)data); } static inline int lh_OPENSSL_CSTRING_comp_thunk(const void *da, const void *db, OPENSSL_LH_COMPFUNC cfn) { int (*cfn_conv)(const OPENSSL_CSTRING *, const OPENSSL_CSTRING *) = (int (*)(const OPENSSL_CSTRING *, const OPENSSL_CSTRING *))cfn; return cfn_conv((const OPENSSL_CSTRING *)da, (const OPENSSL_CSTRING *)db); } static inline void lh_OPENSSL_CSTRING_doall_thunk(void *node, OPENSSL_LH_DOALL_FUNC doall) { void (*doall_conv)(OPENSSL_CSTRING *) = (void (*)(OPENSSL_CSTRING *))doall; doall_conv((OPENSSL_CSTRING *)node); } static inline void lh_OPENSSL_CSTRING_doall_arg_thunk(void *node, void *arg, OPENSSL_LH_DOALL_FUNCARG doall) { void (*doall_conv)(OPENSSL_CSTRING *, void *) = (void (*)(OPENSSL_CSTRING *, void *))doall; doall_conv((OPENSSL_CSTRING *)node, arg); } static __attribute__((unused)) inline OPENSSL_CSTRING * ossl_check_OPENSSL_CSTRING_lh_plain_type(OPENSSL_CSTRING *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_CSTRING * ossl_check_const_OPENSSL_CSTRING_lh_plain_type(const OPENSSL_CSTRING *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_LHASH * ossl_check_const_OPENSSL_CSTRING_lh_type(const struct lhash_st_OPENSSL_CSTRING *lh) { return (const OPENSSL_LHASH *)lh; } static __attribute__((unused)) inline OPENSSL_LHASH * ossl_check_OPENSSL_CSTRING_lh_type(struct lhash_st_OPENSSL_CSTRING *lh) { return (OPENSSL_LHASH *)lh; } static __attribute__((unused)) inline OPENSSL_LH_COMPFUNC ossl_check_OPENSSL_CSTRING_lh_compfunc_type(lh_OPENSSL_CSTRING_compfunc cmp) { return (OPENSSL_LH_COMPFUNC)cmp; } static __attribute__((unused)) inline OPENSSL_LH_HASHFUNC ossl_check_OPENSSL_CSTRING_lh_hashfunc_type(lh_OPENSSL_CSTRING_hashfunc hfn) { return (OPENSSL_LH_HASHFUNC)hfn; } static __attribute__((unused)) inline OPENSSL_LH_DOALL_FUNC ossl_check_OPENSSL_CSTRING_lh_doallfunc_type(lh_OPENSSL_CSTRING_doallfunc dfn) { return (OPENSSL_LH_DOALL_FUNC)dfn; } struct lhash_st_OPENSSL_CSTRING;
7975   # 31 "include/openssl/err.h" 2
7976   # 45 "include/openssl/err.h"
7977   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/limits.h" 1 3 4
7978   # 46 "include/openssl/err.h" 2
7979   # 56 "include/openssl/err.h"
7980   struct err_state_st {
7981       int err_flags[16];
7982       int err_marks[16];
7983       unsigned long err_buffer[16];
7984       char *err_data[16];
7985       size_t err_data_size[16];
7986       int err_data_flags[16];
7987       char *err_file[16];
7988       int err_line[16];
7989       char *err_func[16];
7990       int top, bottom;
7991   };
7992   # 241 "include/openssl/err.h"
7993   static __attribute__((unused)) inline int ERR_GET_LIB(unsigned long errcode)
7994   {
7995       if ((((errcode) & ((unsigned int)0x7fffffff + 1)) != 0))
7996           return 2;
7997       return (errcode >> 23L) & 0xFF;
7998   }
7999   
8000   static __attribute__((unused)) inline int ERR_GET_RFLAGS(unsigned long errcode)
8001   {
8002       if ((((errcode) & ((unsigned int)0x7fffffff + 1)) != 0))
8003           return 0;
8004       return errcode & (0x1F << 18L);
8005   }
8006   
8007   static __attribute__((unused)) inline int ERR_GET_REASON(unsigned long errcode)
8008   {
8009       if ((((errcode) & ((unsigned int)0x7fffffff + 1)) != 0))
8010           return errcode & ((unsigned int)0x7fffffff);
8011       return errcode & 0X7FFFFF;
8012   }
8013   
8014   static __attribute__((unused)) inline int ERR_FATAL_ERROR(unsigned long errcode)
8015   {
8016       return (ERR_GET_RFLAGS(errcode) & (0x1 << 18L)) != 0;
8017   }
8018   
8019   static __attribute__((unused)) inline int ERR_COMMON_ERROR(unsigned long errcode)
8020   {
8021       return (ERR_GET_RFLAGS(errcode) & (0x2 << 18L)) != 0;
8022   }
8023   # 369 "include/openssl/err.h"
8024   typedef struct ERR_string_data_st {
8025       unsigned long error;
8026       const char *string;
8027   } ERR_STRING_DATA;
8028   
8029   struct lhash_st_ERR_STRING_DATA { union lh_ERR_STRING_DATA_dummy { void* d1; unsigned long d2; int d3; } dummy; }; typedef int (*lh_ERR_STRING_DATA_compfunc)(const ERR_STRING_DATA *a, const ERR_STRING_DATA *b); typedef unsigned long (*lh_ERR_STRING_DATA_hashfunc)(const ERR_STRING_DATA *a); typedef void (*lh_ERR_STRING_DATA_doallfunc)(ERR_STRING_DATA *a); static inline unsigned long lh_ERR_STRING_DATA_hash_thunk(const void *data, OPENSSL_LH_HASHFUNC hfn) { unsigned long (*hfn_conv)(const ERR_STRING_DATA *) = (unsigned long (*)(const ERR_STRING_DATA *))hfn; return hfn_conv((const ERR_STRING_DATA *)data); } static inline int lh_ERR_STRING_DATA_comp_thunk(const void *da, const void *db, OPENSSL_LH_COMPFUNC cfn) { int (*cfn_conv)(const ERR_STRING_DATA *, const ERR_STRING_DATA *) = (int (*)(const ERR_STRING_DATA *, const ERR_STRING_DATA *))cfn; return cfn_conv((const ERR_STRING_DATA *)da, (const ERR_STRING_DATA *)db); } static inline void lh_ERR_STRING_DATA_doall_thunk(void *node, OPENSSL_LH_DOALL_FUNC doall) { void (*doall_conv)(ERR_STRING_DATA *) = (void (*)(ERR_STRING_DATA *))doall; doall_conv((ERR_STRING_DATA *)node); } static inline void lh_ERR_STRING_DATA_doall_arg_thunk(void *node, void *arg, OPENSSL_LH_DOALL_FUNCARG doall) { void (*doall_conv)(ERR_STRING_DATA *, void *) = (void (*)(ERR_STRING_DATA *, void *))doall; doall_conv((ERR_STRING_DATA *)node, arg); } static __attribute__((unused)) inline ERR_STRING_DATA * ossl_check_ERR_STRING_DATA_lh_plain_type(ERR_STRING_DATA *ptr) { return ptr; } static __attribute__((unused)) inline const ERR_STRING_DATA * ossl_check_const_ERR_STRING_DATA_lh_plain_type(const ERR_STRING_DATA *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_LHASH * ossl_check_const_ERR_STRING_DATA_lh_type(const struct lhash_st_ERR_STRING_DATA *lh) { return (const OPENSSL_LHASH *)lh; } static __attribute__((unused)) inline OPENSSL_LHASH * ossl_check_ERR_STRING_DATA_lh_type(struct lhash_st_ERR_STRING_DATA *lh) { return (OPENSSL_LHASH *)lh; } static __attribute__((unused)) inline OPENSSL_LH_COMPFUNC ossl_check_ERR_STRING_DATA_lh_compfunc_type(lh_ERR_STRING_DATA_compfunc cmp) { return (OPENSSL_LH_COMPFUNC)cmp; } static __attribute__((unused)) inline OPENSSL_LH_HASHFUNC ossl_check_ERR_STRING_DATA_lh_hashfunc_type(lh_ERR_STRING_DATA_hashfunc hfn) { return (OPENSSL_LH_HASHFUNC)hfn; } static __attribute__((unused)) inline OPENSSL_LH_DOALL_FUNC ossl_check_ERR_STRING_DATA_lh_doallfunc_type(lh_ERR_STRING_DATA_doallfunc dfn) { return (OPENSSL_LH_DOALL_FUNC)dfn; } struct lhash_st_ERR_STRING_DATA;
8030   # 395 "include/openssl/err.h"
8031   void ERR_new(void);
8032   void ERR_set_debug(const char *file, int line, const char *func);
8033   void ERR_set_error(int lib, int reason, const char *fmt, ...);
8034   void ERR_vset_error(int lib, int reason, const char *fmt, va_list args);
8035   # 415 "include/openssl/err.h"
8036   void ERR_set_error_data(char *data, int flags);
8037   
8038   unsigned long ERR_get_error(void);
8039   unsigned long ERR_get_error_all(const char **file, int *line,
8040                                   const char **func,
8041                                   const char **data, int *flags);
8042   
8043   __attribute__((deprecated("Since OpenSSL " "3.0")))
8044   unsigned long ERR_get_error_line(const char **file, int *line);
8045   __attribute__((deprecated("Since OpenSSL " "3.0")))
8046   unsigned long ERR_get_error_line_data(const char **file, int *line,
8047                                         const char **data, int *flags);
8048   
8049   unsigned long ERR_peek_error(void);
8050   unsigned long ERR_peek_error_line(const char **file, int *line);
8051   unsigned long ERR_peek_error_func(const char **func);
8052   unsigned long ERR_peek_error_data(const char **data, int *flags);
8053   unsigned long ERR_peek_error_all(const char **file, int *line,
8054                                    const char **func,
8055                                    const char **data, int *flags);
8056   
8057   __attribute__((deprecated("Since OpenSSL " "3.0")))
8058   unsigned long ERR_peek_error_line_data(const char **file, int *line,
8059                                          const char **data, int *flags);
8060   
8061   unsigned long ERR_peek_last_error(void);
8062   unsigned long ERR_peek_last_error_line(const char **file, int *line);
8063   unsigned long ERR_peek_last_error_func(const char **func);
8064   unsigned long ERR_peek_last_error_data(const char **data, int *flags);
8065   unsigned long ERR_peek_last_error_all(const char **file, int *line,
8066                                         const char **func,
8067                                         const char **data, int *flags);
8068   
8069   __attribute__((deprecated("Since OpenSSL " "3.0")))
8070   unsigned long ERR_peek_last_error_line_data(const char **file, int *line,
8071                                               const char **data, int *flags);
8072   
8073   
8074   void ERR_clear_error(void);
8075   
8076   char *ERR_error_string(unsigned long e, char *buf);
8077   void ERR_error_string_n(unsigned long e, char *buf, size_t len);
8078   const char *ERR_lib_error_string(unsigned long e);
8079   
8080   __attribute__((deprecated("Since OpenSSL " "3.0"))) const char *ERR_func_error_string(unsigned long e);
8081   
8082   const char *ERR_reason_error_string(unsigned long e);
8083   
8084   void ERR_print_errors_cb(int (*cb) (const char *str, size_t len, void *u),
8085                            void *u);
8086   
8087   void ERR_print_errors_fp(FILE *fp);
8088   
8089   void ERR_print_errors(BIO *bp);
8090   
8091   void ERR_add_error_data(int num, ...);
8092   void ERR_add_error_vdata(int num, va_list args);
8093   void ERR_add_error_txt(const char *sepr, const char *txt);
8094   void ERR_add_error_mem_bio(const char *sep, BIO *bio);
8095   
8096   int ERR_load_strings(int lib, ERR_STRING_DATA *str);
8097   int ERR_load_strings_const(const ERR_STRING_DATA *str);
8098   int ERR_unload_strings(int lib, ERR_STRING_DATA *str);
8099   
8100   
8101   
8102   
8103   
8104   
8105   
8106   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) void ERR_remove_thread_state(void *);
8107   
8108   
8109   __attribute__((deprecated("Since OpenSSL " "1.0.0"))) void ERR_remove_state(unsigned long pid);
8110   
8111   
8112   __attribute__((deprecated("Since OpenSSL " "3.0"))) ERR_STATE *ERR_get_state(void);
8113   
8114   
8115   int ERR_get_next_error_library(void);
8116   
8117   int ERR_set_mark(void);
8118   int ERR_pop_to_mark(void);
8119   int ERR_clear_last_mark(void);
8120   int ERR_count_to_mark(void);
8121   int ERR_pop(void);
8122   
8123   ERR_STATE *OSSL_ERR_STATE_new(void);
8124   void OSSL_ERR_STATE_save(ERR_STATE *es);
8125   void OSSL_ERR_STATE_save_to_mark(ERR_STATE *es);
8126   void OSSL_ERR_STATE_restore(const ERR_STATE *es);
8127   void OSSL_ERR_STATE_free(ERR_STATE *es);
8128   # 26 "ssl/ssl_local.h" 2
8129   # 1 "include/openssl/ssl.h" 1
8130   # 19 "include/openssl/ssl.h"
8131           
8132   
8133   
8134   
8135   
8136   
8137   
8138   
8139   # 1 "include/openssl/e_ostime.h" 1
8140   # 12 "include/openssl/e_ostime.h"
8141           
8142   # 28 "include/openssl/ssl.h" 2
8143   
8144   
8145   
8146   
8147   # 1 "include/openssl/x509.h" 1
8148   # 18 "include/openssl/x509.h"
8149           
8150   
8151   
8152   
8153   
8154   
8155   
8156   
8157   # 1 "include/openssl/types.h" 1
8158   # 27 "include/openssl/x509.h" 2
8159   
8160   
8161   # 1 "include/openssl/evp.h" 1
8162   # 12 "include/openssl/evp.h"
8163           
8164   # 26 "include/openssl/evp.h"
8165   # 1 "include/openssl/types.h" 1
8166   # 27 "include/openssl/evp.h" 2
8167   
8168   # 1 "include/openssl/core_dispatch.h" 1
8169   # 12 "include/openssl/core_dispatch.h"
8170           
8171   # 64 "include/openssl/core_dispatch.h"
8172   typedef const OSSL_PARAM * (OSSL_FUNC_core_gettable_params_fn)(const OSSL_CORE_HANDLE *prov); static __attribute__((unused)) inline OSSL_FUNC_core_gettable_params_fn *OSSL_FUNC_core_gettable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_gettable_params_fn *)opf->function; }
8173   
8174   
8175   typedef int (OSSL_FUNC_core_get_params_fn)(const OSSL_CORE_HANDLE *prov, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_core_get_params_fn *OSSL_FUNC_core_get_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_get_params_fn *)opf->function; }
8176   
8177   
8178   typedef int (OSSL_FUNC_core_thread_start_fn)(const OSSL_CORE_HANDLE *prov, OSSL_thread_stop_handler_fn handfn, void *arg); static __attribute__((unused)) inline OSSL_FUNC_core_thread_start_fn *OSSL_FUNC_core_thread_start(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_thread_start_fn *)opf->function; }
8179   
8180   
8181   
8182   typedef OPENSSL_CORE_CTX * (OSSL_FUNC_core_get_libctx_fn)(const OSSL_CORE_HANDLE *prov); static __attribute__((unused)) inline OSSL_FUNC_core_get_libctx_fn *OSSL_FUNC_core_get_libctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_get_libctx_fn *)opf->function; }
8183   
8184   
8185   typedef void (OSSL_FUNC_core_new_error_fn)(const OSSL_CORE_HANDLE *prov); static __attribute__((unused)) inline OSSL_FUNC_core_new_error_fn *OSSL_FUNC_core_new_error(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_new_error_fn *)opf->function; }
8186   
8187   typedef void (OSSL_FUNC_core_set_error_debug_fn)(const OSSL_CORE_HANDLE *prov, const char *file, int line, const char *func); static __attribute__((unused)) inline OSSL_FUNC_core_set_error_debug_fn *OSSL_FUNC_core_set_error_debug(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_set_error_debug_fn *)opf->function; }
8188   
8189   
8190   
8191   typedef void (OSSL_FUNC_core_vset_error_fn)(const OSSL_CORE_HANDLE *prov, uint32_t reason, const char *fmt, va_list args); static __attribute__((unused)) inline OSSL_FUNC_core_vset_error_fn *OSSL_FUNC_core_vset_error(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_vset_error_fn *)opf->function; }
8192   
8193   
8194   
8195   typedef int (OSSL_FUNC_core_set_error_mark_fn)(const OSSL_CORE_HANDLE *prov); static __attribute__((unused)) inline OSSL_FUNC_core_set_error_mark_fn *OSSL_FUNC_core_set_error_mark(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_set_error_mark_fn *)opf->function; }
8196   
8197   typedef int (OSSL_FUNC_core_clear_last_error_mark_fn)(const OSSL_CORE_HANDLE *prov); static __attribute__((unused)) inline OSSL_FUNC_core_clear_last_error_mark_fn *OSSL_FUNC_core_clear_last_error_mark(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_clear_last_error_mark_fn *)opf->function; }
8198   
8199   
8200   typedef int (OSSL_FUNC_core_pop_error_to_mark_fn)(const OSSL_CORE_HANDLE *prov); static __attribute__((unused)) inline OSSL_FUNC_core_pop_error_to_mark_fn *OSSL_FUNC_core_pop_error_to_mark(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_pop_error_to_mark_fn *)opf->function; }
8201   
8202   
8203   
8204   
8205   
8206   
8207   
8208   typedef int (OSSL_FUNC_core_obj_add_sigid_fn)(const OSSL_CORE_HANDLE *prov, const char *sign_name, const char *digest_name, const char *pkey_name); static __attribute__((unused)) inline OSSL_FUNC_core_obj_add_sigid_fn *OSSL_FUNC_core_obj_add_sigid(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_obj_add_sigid_fn *)opf->function; }
8209   
8210   
8211   typedef int (OSSL_FUNC_core_obj_create_fn)(const OSSL_CORE_HANDLE *prov, const char *oid, const char *sn, const char *ln); static __attribute__((unused)) inline OSSL_FUNC_core_obj_create_fn *OSSL_FUNC_core_obj_create(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_core_obj_create_fn *)opf->function; }
8212   
8213   
8214   
8215   
8216   
8217   typedef void * (OSSL_FUNC_CRYPTO_malloc_fn)(size_t num, const char *file, int line); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_malloc_fn *OSSL_FUNC_CRYPTO_malloc(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_malloc_fn *)opf->function; }
8218   
8219   
8220   typedef void * (OSSL_FUNC_CRYPTO_zalloc_fn)(size_t num, const char *file, int line); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_zalloc_fn *OSSL_FUNC_CRYPTO_zalloc(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_zalloc_fn *)opf->function; }
8221   
8222   
8223   typedef void (OSSL_FUNC_CRYPTO_free_fn)(void *ptr, const char *file, int line); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_free_fn *OSSL_FUNC_CRYPTO_free(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_free_fn *)opf->function; }
8224   
8225   
8226   typedef void (OSSL_FUNC_CRYPTO_clear_free_fn)(void *ptr, size_t num, const char *file, int line); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_clear_free_fn *OSSL_FUNC_CRYPTO_clear_free(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_clear_free_fn *)opf->function; }
8227   
8228   
8229   typedef void * (OSSL_FUNC_CRYPTO_realloc_fn)(void *addr, size_t num, const char *file, int line); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_realloc_fn *OSSL_FUNC_CRYPTO_realloc(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_realloc_fn *)opf->function; }
8230   
8231   
8232   typedef void * (OSSL_FUNC_CRYPTO_clear_realloc_fn)(void *addr, size_t old_num, size_t num, const char *file, int line); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_clear_realloc_fn *OSSL_FUNC_CRYPTO_clear_realloc(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_clear_realloc_fn *)opf->function; }
8233   
8234   
8235   
8236   typedef void * (OSSL_FUNC_CRYPTO_secure_malloc_fn)(size_t num, const char *file, int line); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_secure_malloc_fn *OSSL_FUNC_CRYPTO_secure_malloc(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_secure_malloc_fn *)opf->function; }
8237   
8238   
8239   typedef void * (OSSL_FUNC_CRYPTO_secure_zalloc_fn)(size_t num, const char *file, int line); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_secure_zalloc_fn *OSSL_FUNC_CRYPTO_secure_zalloc(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_secure_zalloc_fn *)opf->function; }
8240   
8241   
8242   typedef void (OSSL_FUNC_CRYPTO_secure_free_fn)(void *ptr, const char *file, int line); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_secure_free_fn *OSSL_FUNC_CRYPTO_secure_free(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_secure_free_fn *)opf->function; }
8243   
8244   
8245   typedef void (OSSL_FUNC_CRYPTO_secure_clear_free_fn)(void *ptr, size_t num, const char *file, int line); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_secure_clear_free_fn *OSSL_FUNC_CRYPTO_secure_clear_free(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_secure_clear_free_fn *)opf->function; }
8246   
8247   
8248   
8249   typedef int (OSSL_FUNC_CRYPTO_secure_allocated_fn)(const void *ptr); static __attribute__((unused)) inline OSSL_FUNC_CRYPTO_secure_allocated_fn *OSSL_FUNC_CRYPTO_secure_allocated(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_CRYPTO_secure_allocated_fn *)opf->function; }
8250   
8251   
8252   typedef void (OSSL_FUNC_OPENSSL_cleanse_fn)(void *ptr, size_t len); static __attribute__((unused)) inline OSSL_FUNC_OPENSSL_cleanse_fn *OSSL_FUNC_OPENSSL_cleanse(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_OPENSSL_cleanse_fn *)opf->function; }
8253   # 161 "include/openssl/core_dispatch.h"
8254   typedef OSSL_CORE_BIO * (OSSL_FUNC_BIO_new_file_fn)(const char *filename, const char *mode); static __attribute__((unused)) inline OSSL_FUNC_BIO_new_file_fn *OSSL_FUNC_BIO_new_file(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_new_file_fn *)opf->function; }
8255   
8256   typedef OSSL_CORE_BIO * (OSSL_FUNC_BIO_new_membuf_fn)(const void *buf, int len); static __attribute__((unused)) inline OSSL_FUNC_BIO_new_membuf_fn *OSSL_FUNC_BIO_new_membuf(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_new_membuf_fn *)opf->function; }
8257   typedef int (OSSL_FUNC_BIO_read_ex_fn)(OSSL_CORE_BIO *bio, void *data, size_t data_len, size_t *bytes_read); static __attribute__((unused)) inline OSSL_FUNC_BIO_read_ex_fn *OSSL_FUNC_BIO_read_ex(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_read_ex_fn *)opf->function; }
8258   
8259   typedef int (OSSL_FUNC_BIO_write_ex_fn)(OSSL_CORE_BIO *bio, const void *data, size_t data_len, size_t *written); static __attribute__((unused)) inline OSSL_FUNC_BIO_write_ex_fn *OSSL_FUNC_BIO_write_ex(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_write_ex_fn *)opf->function; }
8260   
8261   typedef int (OSSL_FUNC_BIO_gets_fn)(OSSL_CORE_BIO *bio, char *buf, int size); static __attribute__((unused)) inline OSSL_FUNC_BIO_gets_fn *OSSL_FUNC_BIO_gets(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_gets_fn *)opf->function; }
8262   typedef int (OSSL_FUNC_BIO_puts_fn)(OSSL_CORE_BIO *bio, const char *str); static __attribute__((unused)) inline OSSL_FUNC_BIO_puts_fn *OSSL_FUNC_BIO_puts(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_puts_fn *)opf->function; }
8263   typedef int (OSSL_FUNC_BIO_up_ref_fn)(OSSL_CORE_BIO *bio); static __attribute__((unused)) inline OSSL_FUNC_BIO_up_ref_fn *OSSL_FUNC_BIO_up_ref(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_up_ref_fn *)opf->function; }
8264   typedef int (OSSL_FUNC_BIO_free_fn)(OSSL_CORE_BIO *bio); static __attribute__((unused)) inline OSSL_FUNC_BIO_free_fn *OSSL_FUNC_BIO_free(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_free_fn *)opf->function; }
8265   typedef int (OSSL_FUNC_BIO_vprintf_fn)(OSSL_CORE_BIO *bio, const char *format, va_list args); static __attribute__((unused)) inline OSSL_FUNC_BIO_vprintf_fn *OSSL_FUNC_BIO_vprintf(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_vprintf_fn *)opf->function; }
8266   
8267   typedef int (OSSL_FUNC_BIO_vsnprintf_fn)(char *buf, size_t n, const char *fmt, va_list args); static __attribute__((unused)) inline OSSL_FUNC_BIO_vsnprintf_fn *OSSL_FUNC_BIO_vsnprintf(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_vsnprintf_fn *)opf->function; }
8268   
8269   typedef int (OSSL_FUNC_BIO_ctrl_fn)(OSSL_CORE_BIO *bio, int cmd, long num, void *ptr); static __attribute__((unused)) inline OSSL_FUNC_BIO_ctrl_fn *OSSL_FUNC_BIO_ctrl(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_BIO_ctrl_fn *)opf->function; }
8270   # 186 "include/openssl/core_dispatch.h"
8271   typedef void (OSSL_FUNC_self_test_cb_fn)(OPENSSL_CORE_CTX *ctx, OSSL_CALLBACK **cb, void **cbarg); static __attribute__((unused)) inline OSSL_FUNC_self_test_cb_fn *OSSL_FUNC_self_test_cb(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_self_test_cb_fn *)opf->function; }
8272   
8273   
8274   
8275   
8276   
8277   
8278   
8279   typedef size_t (OSSL_FUNC_get_entropy_fn)(const OSSL_CORE_HANDLE *handle, unsigned char **pout, int entropy, size_t min_len, size_t max_len); static __attribute__((unused)) inline OSSL_FUNC_get_entropy_fn *OSSL_FUNC_get_entropy(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_get_entropy_fn *)opf->function; }
8280   
8281   
8282   typedef size_t (OSSL_FUNC_get_user_entropy_fn)(const OSSL_CORE_HANDLE *handle, unsigned char **pout, int entropy, size_t min_len, size_t max_len); static __attribute__((unused)) inline OSSL_FUNC_get_user_entropy_fn *OSSL_FUNC_get_user_entropy(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_get_user_entropy_fn *)opf->function; }
8283   
8284   
8285   typedef void (OSSL_FUNC_cleanup_entropy_fn)(const OSSL_CORE_HANDLE *handle, unsigned char *buf, size_t len); static __attribute__((unused)) inline OSSL_FUNC_cleanup_entropy_fn *OSSL_FUNC_cleanup_entropy(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cleanup_entropy_fn *)opf->function; }
8286   
8287   typedef void (OSSL_FUNC_cleanup_user_entropy_fn)(const OSSL_CORE_HANDLE *handle, unsigned char *buf, size_t len); static __attribute__((unused)) inline OSSL_FUNC_cleanup_user_entropy_fn *OSSL_FUNC_cleanup_user_entropy(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cleanup_user_entropy_fn *)opf->function; }
8288   
8289   typedef size_t (OSSL_FUNC_get_nonce_fn)(const OSSL_CORE_HANDLE *handle, unsigned char **pout, size_t min_len, size_t max_len, const void *salt, size_t salt_len); static __attribute__((unused)) inline OSSL_FUNC_get_nonce_fn *OSSL_FUNC_get_nonce(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_get_nonce_fn *)opf->function; }
8290   
8291   
8292   
8293   typedef size_t (OSSL_FUNC_get_user_nonce_fn)(const OSSL_CORE_HANDLE *handle, unsigned char **pout, size_t min_len, size_t max_len, const void *salt, size_t salt_len); static __attribute__((unused)) inline OSSL_FUNC_get_user_nonce_fn *OSSL_FUNC_get_user_nonce(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_get_user_nonce_fn *)opf->function; }
8294   
8295   
8296   
8297   typedef void (OSSL_FUNC_cleanup_nonce_fn)(const OSSL_CORE_HANDLE *handle, unsigned char *buf, size_t len); static __attribute__((unused)) inline OSSL_FUNC_cleanup_nonce_fn *OSSL_FUNC_cleanup_nonce(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cleanup_nonce_fn *)opf->function; }
8298   
8299   typedef void (OSSL_FUNC_cleanup_user_nonce_fn)(const OSSL_CORE_HANDLE *handle, unsigned char *buf, size_t len); static __attribute__((unused)) inline OSSL_FUNC_cleanup_user_nonce_fn *OSSL_FUNC_cleanup_user_nonce(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cleanup_user_nonce_fn *)opf->function; }
8300   # 226 "include/openssl/core_dispatch.h"
8301   typedef int (OSSL_FUNC_provider_register_child_cb_fn)(const OSSL_CORE_HANDLE *handle, int (*create_cb)(const OSSL_CORE_HANDLE *provider, void *cbdata), int (*remove_cb)(const OSSL_CORE_HANDLE *provider, void *cbdata), int (*global_props_cb)(const char *props, void *cbdata), void *cbdata); static __attribute__((unused)) inline OSSL_FUNC_provider_register_child_cb_fn *OSSL_FUNC_provider_register_child_cb(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_register_child_cb_fn *)opf->function; }
8302   
8303   
8304   
8305   
8306   
8307   typedef void (OSSL_FUNC_provider_deregister_child_cb_fn)(const OSSL_CORE_HANDLE *handle); static __attribute__((unused)) inline OSSL_FUNC_provider_deregister_child_cb_fn *OSSL_FUNC_provider_deregister_child_cb(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_deregister_child_cb_fn *)opf->function; }
8308   
8309   typedef const char * (OSSL_FUNC_provider_name_fn)(const OSSL_CORE_HANDLE *prov); static __attribute__((unused)) inline OSSL_FUNC_provider_name_fn *OSSL_FUNC_provider_name(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_name_fn *)opf->function; }
8310   
8311   typedef void * (OSSL_FUNC_provider_get0_provider_ctx_fn)(const OSSL_CORE_HANDLE *prov); static __attribute__((unused)) inline OSSL_FUNC_provider_get0_provider_ctx_fn *OSSL_FUNC_provider_get0_provider_ctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_get0_provider_ctx_fn *)opf->function; }
8312   
8313   typedef const OSSL_DISPATCH * (OSSL_FUNC_provider_get0_dispatch_fn)(const OSSL_CORE_HANDLE *prov); static __attribute__((unused)) inline OSSL_FUNC_provider_get0_dispatch_fn *OSSL_FUNC_provider_get0_dispatch(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_get0_dispatch_fn *)opf->function; }
8314   
8315   typedef int (OSSL_FUNC_provider_up_ref_fn)(const OSSL_CORE_HANDLE *prov, int activate); static __attribute__((unused)) inline OSSL_FUNC_provider_up_ref_fn *OSSL_FUNC_provider_up_ref(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_up_ref_fn *)opf->function; }
8316   
8317   typedef int (OSSL_FUNC_provider_free_fn)(const OSSL_CORE_HANDLE *prov, int deactivate); static __attribute__((unused)) inline OSSL_FUNC_provider_free_fn *OSSL_FUNC_provider_free(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_free_fn *)opf->function; }
8318   
8319   
8320   
8321   
8322   typedef void (OSSL_FUNC_provider_teardown_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_provider_teardown_fn *OSSL_FUNC_provider_teardown(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_teardown_fn *)opf->function; }
8323   
8324   typedef const OSSL_PARAM * (OSSL_FUNC_provider_gettable_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_provider_gettable_params_fn *OSSL_FUNC_provider_gettable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_gettable_params_fn *)opf->function; }
8325   
8326   
8327   typedef int (OSSL_FUNC_provider_get_params_fn)(void *provctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_provider_get_params_fn *OSSL_FUNC_provider_get_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_get_params_fn *)opf->function; }
8328   
8329   
8330   typedef const OSSL_ALGORITHM * (OSSL_FUNC_provider_query_operation_fn)(void *provctx, int operation_id, int *no_store); static __attribute__((unused)) inline OSSL_FUNC_provider_query_operation_fn *OSSL_FUNC_provider_query_operation(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_query_operation_fn *)opf->function; }
8331   
8332   
8333   typedef void (OSSL_FUNC_provider_unquery_operation_fn)(void *provctx, int operation_id, const OSSL_ALGORITHM *); static __attribute__((unused)) inline OSSL_FUNC_provider_unquery_operation_fn *OSSL_FUNC_provider_unquery_operation(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_unquery_operation_fn *)opf->function; }
8334   
8335   
8336   typedef const OSSL_ITEM * (OSSL_FUNC_provider_get_reason_strings_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_provider_get_reason_strings_fn *OSSL_FUNC_provider_get_reason_strings(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_get_reason_strings_fn *)opf->function; }
8337   
8338   
8339   typedef int (OSSL_FUNC_provider_get_capabilities_fn)(void *provctx, const char *capability, OSSL_CALLBACK *cb, void *arg); static __attribute__((unused)) inline OSSL_FUNC_provider_get_capabilities_fn *OSSL_FUNC_provider_get_capabilities(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_get_capabilities_fn *)opf->function; }
8340   
8341   
8342   typedef int (OSSL_FUNC_provider_self_test_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_provider_self_test_fn *OSSL_FUNC_provider_self_test(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_provider_self_test_fn *)opf->function; }
8343   # 305 "include/openssl/core_dispatch.h"
8344   typedef void * (OSSL_FUNC_digest_newctx_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_digest_newctx_fn *OSSL_FUNC_digest_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_newctx_fn *)opf->function; }
8345   typedef int (OSSL_FUNC_digest_init_fn)(void *dctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_digest_init_fn *OSSL_FUNC_digest_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_init_fn *)opf->function; }
8346   typedef int (OSSL_FUNC_digest_update_fn)(void *dctx, const unsigned char *in, size_t inl); static __attribute__((unused)) inline OSSL_FUNC_digest_update_fn *OSSL_FUNC_digest_update(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_update_fn *)opf->function; }
8347   
8348   typedef int (OSSL_FUNC_digest_final_fn)(void *dctx, unsigned char *out, size_t *outl, size_t outsz); static __attribute__((unused)) inline OSSL_FUNC_digest_final_fn *OSSL_FUNC_digest_final(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_final_fn *)opf->function; }
8349   
8350   
8351   typedef int (OSSL_FUNC_digest_squeeze_fn)(void *dctx, unsigned char *out, size_t *outl, size_t outsz); static __attribute__((unused)) inline OSSL_FUNC_digest_squeeze_fn *OSSL_FUNC_digest_squeeze(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_squeeze_fn *)opf->function; }
8352   
8353   
8354   typedef int (OSSL_FUNC_digest_digest_fn)(void *provctx, const unsigned char *in, size_t inl, unsigned char *out, size_t *outl, size_t outsz); static __attribute__((unused)) inline OSSL_FUNC_digest_digest_fn *OSSL_FUNC_digest_digest(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_digest_fn *)opf->function; }
8355   
8356   
8357   
8358   typedef void (OSSL_FUNC_digest_freectx_fn)(void *dctx); static __attribute__((unused)) inline OSSL_FUNC_digest_freectx_fn *OSSL_FUNC_digest_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_freectx_fn *)opf->function; }
8359   typedef void * (OSSL_FUNC_digest_dupctx_fn)(void *dctx); static __attribute__((unused)) inline OSSL_FUNC_digest_dupctx_fn *OSSL_FUNC_digest_dupctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_dupctx_fn *)opf->function; }
8360   
8361   typedef int (OSSL_FUNC_digest_get_params_fn)(OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_digest_get_params_fn *OSSL_FUNC_digest_get_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_get_params_fn *)opf->function; }
8362   typedef int (OSSL_FUNC_digest_set_ctx_params_fn)(void *vctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_digest_set_ctx_params_fn *OSSL_FUNC_digest_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_set_ctx_params_fn *)opf->function; }
8363   
8364   typedef int (OSSL_FUNC_digest_get_ctx_params_fn)(void *vctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_digest_get_ctx_params_fn *OSSL_FUNC_digest_get_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_get_ctx_params_fn *)opf->function; }
8365   
8366   typedef const OSSL_PARAM * (OSSL_FUNC_digest_gettable_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_digest_gettable_params_fn *OSSL_FUNC_digest_gettable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_gettable_params_fn *)opf->function; }
8367   
8368   typedef const OSSL_PARAM * (OSSL_FUNC_digest_settable_ctx_params_fn)(void *dctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_digest_settable_ctx_params_fn *OSSL_FUNC_digest_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_settable_ctx_params_fn *)opf->function; }
8369   
8370   typedef const OSSL_PARAM * (OSSL_FUNC_digest_gettable_ctx_params_fn)(void *dctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_digest_gettable_ctx_params_fn *OSSL_FUNC_digest_gettable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_digest_gettable_ctx_params_fn *)opf->function; }
8371   # 351 "include/openssl/core_dispatch.h"
8372   typedef void * (OSSL_FUNC_cipher_newctx_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_cipher_newctx_fn *OSSL_FUNC_cipher_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_newctx_fn *)opf->function; }
8373   typedef int (OSSL_FUNC_cipher_encrypt_init_fn)(void *cctx, const unsigned char *key, size_t keylen, const unsigned char *iv, size_t ivlen, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_cipher_encrypt_init_fn *OSSL_FUNC_cipher_encrypt_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_encrypt_init_fn *)opf->function; }
8374   
8375   
8376   
8377   
8378   
8379   typedef int (OSSL_FUNC_cipher_decrypt_init_fn)(void *cctx, const unsigned char *key, size_t keylen, const unsigned char *iv, size_t ivlen, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_cipher_decrypt_init_fn *OSSL_FUNC_cipher_decrypt_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_decrypt_init_fn *)opf->function; }
8380   
8381   
8382   
8383   
8384   
8385   typedef int (OSSL_FUNC_cipher_update_fn)(void *cctx, unsigned char *out, size_t *outl, size_t outsize, const unsigned char *in, size_t inl); static __attribute__((unused)) inline OSSL_FUNC_cipher_update_fn *OSSL_FUNC_cipher_update(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_update_fn *)opf->function; }
8386   
8387   
8388   
8389   typedef int (OSSL_FUNC_cipher_final_fn)(void *cctx, unsigned char *out, size_t *outl, size_t outsize); static __attribute__((unused)) inline OSSL_FUNC_cipher_final_fn *OSSL_FUNC_cipher_final(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_final_fn *)opf->function; }
8390   
8391   
8392   typedef int (OSSL_FUNC_cipher_cipher_fn)(void *cctx, unsigned char *out, size_t *outl, size_t outsize, const unsigned char *in, size_t inl); static __attribute__((unused)) inline OSSL_FUNC_cipher_cipher_fn *OSSL_FUNC_cipher_cipher(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_cipher_fn *)opf->function; }
8393   
8394   
8395   
8396   typedef void (OSSL_FUNC_cipher_freectx_fn)(void *cctx); static __attribute__((unused)) inline OSSL_FUNC_cipher_freectx_fn *OSSL_FUNC_cipher_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_freectx_fn *)opf->function; }
8397   typedef void * (OSSL_FUNC_cipher_dupctx_fn)(void *cctx); static __attribute__((unused)) inline OSSL_FUNC_cipher_dupctx_fn *OSSL_FUNC_cipher_dupctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_dupctx_fn *)opf->function; }
8398   typedef int (OSSL_FUNC_cipher_get_params_fn)(OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_cipher_get_params_fn *OSSL_FUNC_cipher_get_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_get_params_fn *)opf->function; }
8399   typedef int (OSSL_FUNC_cipher_get_ctx_params_fn)(void *cctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_cipher_get_ctx_params_fn *OSSL_FUNC_cipher_get_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_get_ctx_params_fn *)opf->function; }
8400   
8401   typedef int (OSSL_FUNC_cipher_set_ctx_params_fn)(void *cctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_cipher_set_ctx_params_fn *OSSL_FUNC_cipher_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_set_ctx_params_fn *)opf->function; }
8402   
8403   typedef const OSSL_PARAM * (OSSL_FUNC_cipher_gettable_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_cipher_gettable_params_fn *OSSL_FUNC_cipher_gettable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_gettable_params_fn *)opf->function; }
8404   
8405   typedef const OSSL_PARAM * (OSSL_FUNC_cipher_settable_ctx_params_fn)(void *cctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_cipher_settable_ctx_params_fn *OSSL_FUNC_cipher_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_settable_ctx_params_fn *)opf->function; }
8406   
8407   typedef const OSSL_PARAM * (OSSL_FUNC_cipher_gettable_ctx_params_fn)(void *cctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_cipher_gettable_ctx_params_fn *OSSL_FUNC_cipher_gettable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_cipher_gettable_ctx_params_fn *)opf->function; }
8408   # 404 "include/openssl/core_dispatch.h"
8409   typedef void * (OSSL_FUNC_mac_newctx_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_mac_newctx_fn *OSSL_FUNC_mac_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_newctx_fn *)opf->function; }
8410   typedef void * (OSSL_FUNC_mac_dupctx_fn)(void *src); static __attribute__((unused)) inline OSSL_FUNC_mac_dupctx_fn *OSSL_FUNC_mac_dupctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_dupctx_fn *)opf->function; }
8411   typedef void (OSSL_FUNC_mac_freectx_fn)(void *mctx); static __attribute__((unused)) inline OSSL_FUNC_mac_freectx_fn *OSSL_FUNC_mac_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_freectx_fn *)opf->function; }
8412   typedef int (OSSL_FUNC_mac_init_fn)(void *mctx, const unsigned char *key, size_t keylen, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_mac_init_fn *OSSL_FUNC_mac_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_init_fn *)opf->function; }
8413   
8414   typedef int (OSSL_FUNC_mac_update_fn)(void *mctx, const unsigned char *in, size_t inl); static __attribute__((unused)) inline OSSL_FUNC_mac_update_fn *OSSL_FUNC_mac_update(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_update_fn *)opf->function; }
8415   
8416   typedef int (OSSL_FUNC_mac_final_fn)(void *mctx, unsigned char *out, size_t *outl, size_t outsize); static __attribute__((unused)) inline OSSL_FUNC_mac_final_fn *OSSL_FUNC_mac_final(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_final_fn *)opf->function; }
8417   
8418   
8419   typedef const OSSL_PARAM * (OSSL_FUNC_mac_gettable_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_mac_gettable_params_fn *OSSL_FUNC_mac_gettable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_gettable_params_fn *)opf->function; }
8420   typedef const OSSL_PARAM * (OSSL_FUNC_mac_gettable_ctx_params_fn)(void *mctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_mac_gettable_ctx_params_fn *OSSL_FUNC_mac_gettable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_gettable_ctx_params_fn *)opf->function; }
8421   
8422   typedef const OSSL_PARAM * (OSSL_FUNC_mac_settable_ctx_params_fn)(void *mctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_mac_settable_ctx_params_fn *OSSL_FUNC_mac_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_settable_ctx_params_fn *)opf->function; }
8423   
8424   typedef int (OSSL_FUNC_mac_get_params_fn)(OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_mac_get_params_fn *OSSL_FUNC_mac_get_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_get_params_fn *)opf->function; }
8425   typedef int (OSSL_FUNC_mac_get_ctx_params_fn)(void *mctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_mac_get_ctx_params_fn *OSSL_FUNC_mac_get_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_get_ctx_params_fn *)opf->function; }
8426   
8427   typedef int (OSSL_FUNC_mac_set_ctx_params_fn)(void *mctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_mac_set_ctx_params_fn *OSSL_FUNC_mac_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_mac_set_ctx_params_fn *)opf->function; }
8428   # 439 "include/openssl/core_dispatch.h"
8429   typedef void * (OSSL_FUNC_kdf_newctx_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_kdf_newctx_fn *OSSL_FUNC_kdf_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_newctx_fn *)opf->function; }
8430   typedef void * (OSSL_FUNC_kdf_dupctx_fn)(void *src); static __attribute__((unused)) inline OSSL_FUNC_kdf_dupctx_fn *OSSL_FUNC_kdf_dupctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_dupctx_fn *)opf->function; }
8431   typedef void (OSSL_FUNC_kdf_freectx_fn)(void *kctx); static __attribute__((unused)) inline OSSL_FUNC_kdf_freectx_fn *OSSL_FUNC_kdf_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_freectx_fn *)opf->function; }
8432   typedef void (OSSL_FUNC_kdf_reset_fn)(void *kctx); static __attribute__((unused)) inline OSSL_FUNC_kdf_reset_fn *OSSL_FUNC_kdf_reset(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_reset_fn *)opf->function; }
8433   typedef int (OSSL_FUNC_kdf_derive_fn)(void *kctx, unsigned char *key, size_t keylen, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_kdf_derive_fn *OSSL_FUNC_kdf_derive(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_derive_fn *)opf->function; }
8434   
8435   typedef const OSSL_PARAM * (OSSL_FUNC_kdf_gettable_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_kdf_gettable_params_fn *OSSL_FUNC_kdf_gettable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_gettable_params_fn *)opf->function; }
8436   typedef const OSSL_PARAM * (OSSL_FUNC_kdf_gettable_ctx_params_fn)(void *kctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_kdf_gettable_ctx_params_fn *OSSL_FUNC_kdf_gettable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_gettable_ctx_params_fn *)opf->function; }
8437   
8438   typedef const OSSL_PARAM * (OSSL_FUNC_kdf_settable_ctx_params_fn)(void *kctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_kdf_settable_ctx_params_fn *OSSL_FUNC_kdf_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_settable_ctx_params_fn *)opf->function; }
8439   
8440   typedef int (OSSL_FUNC_kdf_get_params_fn)(OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_kdf_get_params_fn *OSSL_FUNC_kdf_get_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_get_params_fn *)opf->function; }
8441   typedef int (OSSL_FUNC_kdf_get_ctx_params_fn)(void *kctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_kdf_get_ctx_params_fn *OSSL_FUNC_kdf_get_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_get_ctx_params_fn *)opf->function; }
8442   
8443   typedef int (OSSL_FUNC_kdf_set_ctx_params_fn)(void *kctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_kdf_set_ctx_params_fn *OSSL_FUNC_kdf_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kdf_set_ctx_params_fn *)opf->function; }
8444   # 478 "include/openssl/core_dispatch.h"
8445   typedef void * (OSSL_FUNC_rand_newctx_fn)(void *provctx, void *parent, const OSSL_DISPATCH *parent_calls); static __attribute__((unused)) inline OSSL_FUNC_rand_newctx_fn *OSSL_FUNC_rand_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_newctx_fn *)opf->function; }
8446   
8447   
8448   typedef void (OSSL_FUNC_rand_freectx_fn)(void *vctx); static __attribute__((unused)) inline OSSL_FUNC_rand_freectx_fn *OSSL_FUNC_rand_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_freectx_fn *)opf->function; }
8449   typedef int (OSSL_FUNC_rand_instantiate_fn)(void *vdrbg, unsigned int strength, int prediction_resistance, const unsigned char *pstr, size_t pstr_len, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_rand_instantiate_fn *OSSL_FUNC_rand_instantiate(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_instantiate_fn *)opf->function; }
8450   
8451   
8452   
8453   
8454   typedef int (OSSL_FUNC_rand_uninstantiate_fn)(void *vdrbg); static __attribute__((unused)) inline OSSL_FUNC_rand_uninstantiate_fn *OSSL_FUNC_rand_uninstantiate(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_uninstantiate_fn *)opf->function; }
8455   typedef int (OSSL_FUNC_rand_generate_fn)(void *vctx, unsigned char *out, size_t outlen, unsigned int strength, int prediction_resistance, const unsigned char *addin, size_t addin_len); static __attribute__((unused)) inline OSSL_FUNC_rand_generate_fn *OSSL_FUNC_rand_generate(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_generate_fn *)opf->function; }
8456   
8457   
8458   
8459   typedef int (OSSL_FUNC_rand_reseed_fn)(void *vctx, int prediction_resistance, const unsigned char *ent, size_t ent_len, const unsigned char *addin, size_t addin_len); static __attribute__((unused)) inline OSSL_FUNC_rand_reseed_fn *OSSL_FUNC_rand_reseed(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_reseed_fn *)opf->function; }
8460   
8461   
8462   
8463   typedef size_t (OSSL_FUNC_rand_nonce_fn)(void *vctx, unsigned char *out, unsigned int strength, size_t min_noncelen, size_t max_noncelen); static __attribute__((unused)) inline OSSL_FUNC_rand_nonce_fn *OSSL_FUNC_rand_nonce(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_nonce_fn *)opf->function; }
8464   
8465   
8466   typedef int (OSSL_FUNC_rand_enable_locking_fn)(void *vctx); static __attribute__((unused)) inline OSSL_FUNC_rand_enable_locking_fn *OSSL_FUNC_rand_enable_locking(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_enable_locking_fn *)opf->function; }
8467   typedef int (OSSL_FUNC_rand_lock_fn)(void *vctx); static __attribute__((unused)) inline OSSL_FUNC_rand_lock_fn *OSSL_FUNC_rand_lock(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_lock_fn *)opf->function; }
8468   typedef void (OSSL_FUNC_rand_unlock_fn)(void *vctx); static __attribute__((unused)) inline OSSL_FUNC_rand_unlock_fn *OSSL_FUNC_rand_unlock(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_unlock_fn *)opf->function; }
8469   typedef const OSSL_PARAM * (OSSL_FUNC_rand_gettable_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_rand_gettable_params_fn *OSSL_FUNC_rand_gettable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_gettable_params_fn *)opf->function; }
8470   typedef const OSSL_PARAM * (OSSL_FUNC_rand_gettable_ctx_params_fn)(void *vctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_rand_gettable_ctx_params_fn *OSSL_FUNC_rand_gettable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_gettable_ctx_params_fn *)opf->function; }
8471   
8472   typedef const OSSL_PARAM * (OSSL_FUNC_rand_settable_ctx_params_fn)(void *vctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_rand_settable_ctx_params_fn *OSSL_FUNC_rand_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_settable_ctx_params_fn *)opf->function; }
8473   
8474   typedef int (OSSL_FUNC_rand_get_params_fn)(OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_rand_get_params_fn *OSSL_FUNC_rand_get_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_get_params_fn *)opf->function; }
8475   typedef int (OSSL_FUNC_rand_get_ctx_params_fn)(void *vctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_rand_get_ctx_params_fn *OSSL_FUNC_rand_get_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_get_ctx_params_fn *)opf->function; }
8476   
8477   typedef int (OSSL_FUNC_rand_set_ctx_params_fn)(void *vctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_rand_set_ctx_params_fn *OSSL_FUNC_rand_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_set_ctx_params_fn *)opf->function; }
8478   
8479   typedef void (OSSL_FUNC_rand_set_callbacks_fn)(void *vctx, OSSL_INOUT_CALLBACK *get_entropy, OSSL_CALLBACK *cleanup_entropy, OSSL_INOUT_CALLBACK *get_nonce, OSSL_CALLBACK *cleanup_nonce, void *arg); static __attribute__((unused)) inline OSSL_FUNC_rand_set_callbacks_fn *OSSL_FUNC_rand_set_callbacks(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_set_callbacks_fn *)opf->function; }
8480   
8481   
8482   
8483   
8484   typedef int (OSSL_FUNC_rand_verify_zeroization_fn)(void *vctx); static __attribute__((unused)) inline OSSL_FUNC_rand_verify_zeroization_fn *OSSL_FUNC_rand_verify_zeroization(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_verify_zeroization_fn *)opf->function; }
8485   
8486   typedef size_t (OSSL_FUNC_rand_get_seed_fn)(void *vctx, unsigned char **buffer, int entropy, size_t min_len, size_t max_len, int prediction_resistance, const unsigned char *adin, size_t adin_len); static __attribute__((unused)) inline OSSL_FUNC_rand_get_seed_fn *OSSL_FUNC_rand_get_seed(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_get_seed_fn *)opf->function; }
8487   
8488   
8489   
8490   
8491   typedef void (OSSL_FUNC_rand_clear_seed_fn)(void *vctx, unsigned char *buffer, size_t b_len); static __attribute__((unused)) inline OSSL_FUNC_rand_clear_seed_fn *OSSL_FUNC_rand_clear_seed(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rand_clear_seed_fn *)opf->function; }
8492   # 582 "include/openssl/core_dispatch.h"
8493   typedef void * (OSSL_FUNC_keymgmt_new_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_new_fn *OSSL_FUNC_keymgmt_new(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_new_fn *)opf->function; }
8494   # 591 "include/openssl/core_dispatch.h"
8495   typedef void * (OSSL_FUNC_keymgmt_gen_init_fn)(void *provctx, int selection, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_gen_init_fn *OSSL_FUNC_keymgmt_gen_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_gen_init_fn *)opf->function; }
8496   
8497   typedef int (OSSL_FUNC_keymgmt_gen_set_template_fn)(void *genctx, void *templ); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_gen_set_template_fn *OSSL_FUNC_keymgmt_gen_set_template(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_gen_set_template_fn *)opf->function; }
8498   
8499   typedef int (OSSL_FUNC_keymgmt_gen_set_params_fn)(void *genctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_gen_set_params_fn *OSSL_FUNC_keymgmt_gen_set_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_gen_set_params_fn *)opf->function; }
8500   
8501   typedef const OSSL_PARAM * (OSSL_FUNC_keymgmt_gen_settable_params_fn)(void *genctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_gen_settable_params_fn *OSSL_FUNC_keymgmt_gen_settable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_gen_settable_params_fn *)opf->function; }
8502   
8503   
8504   typedef void * (OSSL_FUNC_keymgmt_gen_fn)(void *genctx, OSSL_CALLBACK *cb, void *cbarg); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_gen_fn *OSSL_FUNC_keymgmt_gen(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_gen_fn *)opf->function; }
8505   
8506   typedef void (OSSL_FUNC_keymgmt_gen_cleanup_fn)(void *genctx); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_gen_cleanup_fn *OSSL_FUNC_keymgmt_gen_cleanup(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_gen_cleanup_fn *)opf->function; }
8507   
8508   
8509   
8510   typedef void * (OSSL_FUNC_keymgmt_load_fn)(const void *reference, size_t reference_sz); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_load_fn *OSSL_FUNC_keymgmt_load(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_load_fn *)opf->function; }
8511   
8512   
8513   
8514   
8515   typedef void (OSSL_FUNC_keymgmt_free_fn)(void *keydata); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_free_fn *OSSL_FUNC_keymgmt_free(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_free_fn *)opf->function; }
8516   
8517   
8518   
8519   
8520   typedef int (OSSL_FUNC_keymgmt_get_params_fn)(void *keydata, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_get_params_fn *OSSL_FUNC_keymgmt_get_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_get_params_fn *)opf->function; }
8521   
8522   typedef const OSSL_PARAM * (OSSL_FUNC_keymgmt_gettable_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_gettable_params_fn *OSSL_FUNC_keymgmt_gettable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_gettable_params_fn *)opf->function; }
8523   
8524   
8525   
8526   
8527   typedef int (OSSL_FUNC_keymgmt_set_params_fn)(void *keydata, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_set_params_fn *OSSL_FUNC_keymgmt_set_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_set_params_fn *)opf->function; }
8528   
8529   typedef const OSSL_PARAM * (OSSL_FUNC_keymgmt_settable_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_settable_params_fn *OSSL_FUNC_keymgmt_settable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_settable_params_fn *)opf->function; }
8530   
8531   
8532   
8533   
8534   typedef const char * (OSSL_FUNC_keymgmt_query_operation_name_fn)(int operation_id); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_query_operation_name_fn *OSSL_FUNC_keymgmt_query_operation_name(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_query_operation_name_fn *)opf->function; }
8535   
8536   
8537   
8538   
8539   typedef int (OSSL_FUNC_keymgmt_has_fn)(const void *keydata, int selection); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_has_fn *OSSL_FUNC_keymgmt_has(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_has_fn *)opf->function; }
8540   
8541   
8542   
8543   typedef int (OSSL_FUNC_keymgmt_validate_fn)(const void *keydata, int selection, int checktype); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_validate_fn *OSSL_FUNC_keymgmt_validate(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_validate_fn *)opf->function; }
8544   
8545   
8546   
8547   
8548   typedef int (OSSL_FUNC_keymgmt_match_fn)(const void *keydata1, const void *keydata2, int selection); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_match_fn *OSSL_FUNC_keymgmt_match(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_match_fn *)opf->function; }
8549   # 653 "include/openssl/core_dispatch.h"
8550   typedef int (OSSL_FUNC_keymgmt_import_fn)(void *keydata, int selection, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_import_fn *OSSL_FUNC_keymgmt_import(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_import_fn *)opf->function; }
8551   
8552   typedef const OSSL_PARAM * (OSSL_FUNC_keymgmt_import_types_fn)(int selection); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_import_types_fn *OSSL_FUNC_keymgmt_import_types(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_import_types_fn *)opf->function; }
8553   
8554   typedef int (OSSL_FUNC_keymgmt_export_fn)(void *keydata, int selection, OSSL_CALLBACK *param_cb, void *cbarg); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_export_fn *OSSL_FUNC_keymgmt_export(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_export_fn *)opf->function; }
8555   
8556   
8557   typedef const OSSL_PARAM * (OSSL_FUNC_keymgmt_export_types_fn)(int selection); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_export_types_fn *OSSL_FUNC_keymgmt_export_types(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_export_types_fn *)opf->function; }
8558   
8559   
8560   
8561   
8562   typedef void * (OSSL_FUNC_keymgmt_dup_fn)(const void *keydata_from, int selection); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_dup_fn *OSSL_FUNC_keymgmt_dup(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_dup_fn *)opf->function; }
8563   
8564   
8565   
8566   
8567   
8568   typedef const OSSL_PARAM * (OSSL_FUNC_keymgmt_import_types_ex_fn)(void *provctx, int selection); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_import_types_ex_fn *OSSL_FUNC_keymgmt_import_types_ex(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_import_types_ex_fn *)opf->function; }
8569   
8570   typedef const OSSL_PARAM * (OSSL_FUNC_keymgmt_export_types_ex_fn)(void *provctx, int selection); static __attribute__((unused)) inline OSSL_FUNC_keymgmt_export_types_ex_fn *OSSL_FUNC_keymgmt_export_types_ex(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keymgmt_export_types_ex_fn *)opf->function; }
8571   # 689 "include/openssl/core_dispatch.h"
8572   typedef void * (OSSL_FUNC_keyexch_newctx_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_keyexch_newctx_fn *OSSL_FUNC_keyexch_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keyexch_newctx_fn *)opf->function; }
8573   typedef int (OSSL_FUNC_keyexch_init_fn)(void *ctx, void *provkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_keyexch_init_fn *OSSL_FUNC_keyexch_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keyexch_init_fn *)opf->function; }
8574   
8575   typedef int (OSSL_FUNC_keyexch_derive_fn)(void *ctx, unsigned char *secret, size_t *secretlen, size_t outlen); static __attribute__((unused)) inline OSSL_FUNC_keyexch_derive_fn *OSSL_FUNC_keyexch_derive(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keyexch_derive_fn *)opf->function; }
8576   
8577   typedef int (OSSL_FUNC_keyexch_set_peer_fn)(void *ctx, void *provkey); static __attribute__((unused)) inline OSSL_FUNC_keyexch_set_peer_fn *OSSL_FUNC_keyexch_set_peer(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keyexch_set_peer_fn *)opf->function; }
8578   typedef void (OSSL_FUNC_keyexch_freectx_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_keyexch_freectx_fn *OSSL_FUNC_keyexch_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keyexch_freectx_fn *)opf->function; }
8579   typedef void * (OSSL_FUNC_keyexch_dupctx_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_keyexch_dupctx_fn *OSSL_FUNC_keyexch_dupctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keyexch_dupctx_fn *)opf->function; }
8580   typedef int (OSSL_FUNC_keyexch_set_ctx_params_fn)(void *ctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_keyexch_set_ctx_params_fn *OSSL_FUNC_keyexch_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keyexch_set_ctx_params_fn *)opf->function; }
8581   
8582   typedef const OSSL_PARAM * (OSSL_FUNC_keyexch_settable_ctx_params_fn)(void *ctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_keyexch_settable_ctx_params_fn *OSSL_FUNC_keyexch_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keyexch_settable_ctx_params_fn *)opf->function; }
8583   
8584   typedef int (OSSL_FUNC_keyexch_get_ctx_params_fn)(void *ctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_keyexch_get_ctx_params_fn *OSSL_FUNC_keyexch_get_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keyexch_get_ctx_params_fn *)opf->function; }
8585   
8586   typedef const OSSL_PARAM * (OSSL_FUNC_keyexch_gettable_ctx_params_fn)(void *ctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_keyexch_gettable_ctx_params_fn *OSSL_FUNC_keyexch_gettable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_keyexch_gettable_ctx_params_fn *)opf->function; }
8587   # 734 "include/openssl/core_dispatch.h"
8588   typedef void * (OSSL_FUNC_signature_newctx_fn)(void *provctx, const char *propq); static __attribute__((unused)) inline OSSL_FUNC_signature_newctx_fn *OSSL_FUNC_signature_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_newctx_fn *)opf->function; }
8589   
8590   typedef int (OSSL_FUNC_signature_sign_init_fn)(void *ctx, void *provkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_signature_sign_init_fn *OSSL_FUNC_signature_sign_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_sign_init_fn *)opf->function; }
8591   
8592   typedef int (OSSL_FUNC_signature_sign_fn)(void *ctx, unsigned char *sig, size_t *siglen, size_t sigsize, const unsigned char *tbs, size_t tbslen); static __attribute__((unused)) inline OSSL_FUNC_signature_sign_fn *OSSL_FUNC_signature_sign(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_sign_fn *)opf->function; }
8593   
8594   
8595   
8596   typedef int (OSSL_FUNC_signature_verify_init_fn)(void *ctx, void *provkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_signature_verify_init_fn *OSSL_FUNC_signature_verify_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_verify_init_fn *)opf->function; }
8597   
8598   typedef int (OSSL_FUNC_signature_verify_fn)(void *ctx, const unsigned char *sig, size_t siglen, const unsigned char *tbs, size_t tbslen); static __attribute__((unused)) inline OSSL_FUNC_signature_verify_fn *OSSL_FUNC_signature_verify(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_verify_fn *)opf->function; }
8599   
8600   
8601   
8602   
8603   typedef int (OSSL_FUNC_signature_verify_recover_init_fn)(void *ctx, void *provkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_signature_verify_recover_init_fn *OSSL_FUNC_signature_verify_recover_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_verify_recover_init_fn *)opf->function; }
8604   
8605   typedef int (OSSL_FUNC_signature_verify_recover_fn)(void *ctx, unsigned char *rout, size_t *routlen, size_t routsize, const unsigned char *sig, size_t siglen); static __attribute__((unused)) inline OSSL_FUNC_signature_verify_recover_fn *OSSL_FUNC_signature_verify_recover(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_verify_recover_fn *)opf->function; }
8606   
8607   
8608   typedef int (OSSL_FUNC_signature_digest_sign_init_fn)(void *ctx, const char *mdname, void *provkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_signature_digest_sign_init_fn *OSSL_FUNC_signature_digest_sign_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_digest_sign_init_fn *)opf->function; }
8609   
8610   
8611   typedef int (OSSL_FUNC_signature_digest_sign_update_fn)(void *ctx, const unsigned char *data, size_t datalen); static __attribute__((unused)) inline OSSL_FUNC_signature_digest_sign_update_fn *OSSL_FUNC_signature_digest_sign_update(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_digest_sign_update_fn *)opf->function; }
8612   
8613   typedef int (OSSL_FUNC_signature_digest_sign_final_fn)(void *ctx, unsigned char *sig, size_t *siglen, size_t sigsize); static __attribute__((unused)) inline OSSL_FUNC_signature_digest_sign_final_fn *OSSL_FUNC_signature_digest_sign_final(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_digest_sign_final_fn *)opf->function; }
8614   
8615   
8616   typedef int (OSSL_FUNC_signature_digest_sign_fn)(void *ctx, unsigned char *sigret, size_t *siglen, size_t sigsize, const unsigned char *tbs, size_t tbslen); static __attribute__((unused)) inline OSSL_FUNC_signature_digest_sign_fn *OSSL_FUNC_signature_digest_sign(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_digest_sign_fn *)opf->function; }
8617   
8618   
8619   typedef int (OSSL_FUNC_signature_digest_verify_init_fn)(void *ctx, const char *mdname, void *provkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_signature_digest_verify_init_fn *OSSL_FUNC_signature_digest_verify_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_digest_verify_init_fn *)opf->function; }
8620   
8621   
8622   typedef int (OSSL_FUNC_signature_digest_verify_update_fn)(void *ctx, const unsigned char *data, size_t datalen); static __attribute__((unused)) inline OSSL_FUNC_signature_digest_verify_update_fn *OSSL_FUNC_signature_digest_verify_update(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_digest_verify_update_fn *)opf->function; }
8623   
8624   typedef int (OSSL_FUNC_signature_digest_verify_final_fn)(void *ctx, const unsigned char *sig, size_t siglen); static __attribute__((unused)) inline OSSL_FUNC_signature_digest_verify_final_fn *OSSL_FUNC_signature_digest_verify_final(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_digest_verify_final_fn *)opf->function; }
8625   
8626   typedef int (OSSL_FUNC_signature_digest_verify_fn)(void *ctx, const unsigned char *sig, size_t siglen, const unsigned char *tbs, size_t tbslen); static __attribute__((unused)) inline OSSL_FUNC_signature_digest_verify_fn *OSSL_FUNC_signature_digest_verify(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_digest_verify_fn *)opf->function; }
8627   
8628   
8629   typedef void (OSSL_FUNC_signature_freectx_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_signature_freectx_fn *OSSL_FUNC_signature_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_freectx_fn *)opf->function; }
8630   typedef void * (OSSL_FUNC_signature_dupctx_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_signature_dupctx_fn *OSSL_FUNC_signature_dupctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_dupctx_fn *)opf->function; }
8631   typedef int (OSSL_FUNC_signature_get_ctx_params_fn)(void *ctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_signature_get_ctx_params_fn *OSSL_FUNC_signature_get_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_get_ctx_params_fn *)opf->function; }
8632   
8633   typedef const OSSL_PARAM * (OSSL_FUNC_signature_gettable_ctx_params_fn)(void *ctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_signature_gettable_ctx_params_fn *OSSL_FUNC_signature_gettable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_gettable_ctx_params_fn *)opf->function; }
8634   
8635   typedef int (OSSL_FUNC_signature_set_ctx_params_fn)(void *ctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_signature_set_ctx_params_fn *OSSL_FUNC_signature_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_set_ctx_params_fn *)opf->function; }
8636   
8637   typedef const OSSL_PARAM * (OSSL_FUNC_signature_settable_ctx_params_fn)(void *ctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_signature_settable_ctx_params_fn *OSSL_FUNC_signature_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_settable_ctx_params_fn *)opf->function; }
8638   
8639   typedef int (OSSL_FUNC_signature_get_ctx_md_params_fn)(void *ctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_signature_get_ctx_md_params_fn *OSSL_FUNC_signature_get_ctx_md_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_get_ctx_md_params_fn *)opf->function; }
8640   
8641   typedef const OSSL_PARAM * (OSSL_FUNC_signature_gettable_ctx_md_params_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_signature_gettable_ctx_md_params_fn *OSSL_FUNC_signature_gettable_ctx_md_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_gettable_ctx_md_params_fn *)opf->function; }
8642   
8643   typedef int (OSSL_FUNC_signature_set_ctx_md_params_fn)(void *ctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_signature_set_ctx_md_params_fn *OSSL_FUNC_signature_set_ctx_md_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_set_ctx_md_params_fn *)opf->function; }
8644   
8645   typedef const OSSL_PARAM * (OSSL_FUNC_signature_settable_ctx_md_params_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_signature_settable_ctx_md_params_fn *OSSL_FUNC_signature_settable_ctx_md_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_signature_settable_ctx_md_params_fn *)opf->function; }
8646   # 809 "include/openssl/core_dispatch.h"
8647   typedef void * (OSSL_FUNC_asym_cipher_newctx_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_newctx_fn *OSSL_FUNC_asym_cipher_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_newctx_fn *)opf->function; }
8648   typedef int (OSSL_FUNC_asym_cipher_encrypt_init_fn)(void *ctx, void *provkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_encrypt_init_fn *OSSL_FUNC_asym_cipher_encrypt_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_encrypt_init_fn *)opf->function; }
8649   
8650   typedef int (OSSL_FUNC_asym_cipher_encrypt_fn)(void *ctx, unsigned char *out, size_t *outlen, size_t outsize, const unsigned char *in, size_t inlen); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_encrypt_fn *OSSL_FUNC_asym_cipher_encrypt(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_encrypt_fn *)opf->function; }
8651   
8652   
8653   
8654   
8655   typedef int (OSSL_FUNC_asym_cipher_decrypt_init_fn)(void *ctx, void *provkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_decrypt_init_fn *OSSL_FUNC_asym_cipher_decrypt_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_decrypt_init_fn *)opf->function; }
8656   
8657   typedef int (OSSL_FUNC_asym_cipher_decrypt_fn)(void *ctx, unsigned char *out, size_t *outlen, size_t outsize, const unsigned char *in, size_t inlen); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_decrypt_fn *OSSL_FUNC_asym_cipher_decrypt(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_decrypt_fn *)opf->function; }
8658   
8659   
8660   
8661   
8662   typedef void (OSSL_FUNC_asym_cipher_freectx_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_freectx_fn *OSSL_FUNC_asym_cipher_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_freectx_fn *)opf->function; }
8663   typedef void * (OSSL_FUNC_asym_cipher_dupctx_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_dupctx_fn *OSSL_FUNC_asym_cipher_dupctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_dupctx_fn *)opf->function; }
8664   typedef int (OSSL_FUNC_asym_cipher_get_ctx_params_fn)(void *ctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_get_ctx_params_fn *OSSL_FUNC_asym_cipher_get_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_get_ctx_params_fn *)opf->function; }
8665   
8666   typedef const OSSL_PARAM * (OSSL_FUNC_asym_cipher_gettable_ctx_params_fn)(void *ctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_gettable_ctx_params_fn *OSSL_FUNC_asym_cipher_gettable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_gettable_ctx_params_fn *)opf->function; }
8667   
8668   typedef int (OSSL_FUNC_asym_cipher_set_ctx_params_fn)(void *ctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_set_ctx_params_fn *OSSL_FUNC_asym_cipher_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_set_ctx_params_fn *)opf->function; }
8669   
8670   typedef const OSSL_PARAM * (OSSL_FUNC_asym_cipher_settable_ctx_params_fn)(void *ctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_asym_cipher_settable_ctx_params_fn *OSSL_FUNC_asym_cipher_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_asym_cipher_settable_ctx_params_fn *)opf->function; }
8671   # 850 "include/openssl/core_dispatch.h"
8672   typedef void * (OSSL_FUNC_kem_newctx_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_kem_newctx_fn *OSSL_FUNC_kem_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_newctx_fn *)opf->function; }
8673   typedef int (OSSL_FUNC_kem_encapsulate_init_fn)(void *ctx, void *provkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_kem_encapsulate_init_fn *OSSL_FUNC_kem_encapsulate_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_encapsulate_init_fn *)opf->function; }
8674   
8675   typedef int (OSSL_FUNC_kem_auth_encapsulate_init_fn)(void *ctx, void *provkey, void *authprivkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_kem_auth_encapsulate_init_fn *OSSL_FUNC_kem_auth_encapsulate_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_auth_encapsulate_init_fn *)opf->function; }
8676   
8677   
8678   typedef int (OSSL_FUNC_kem_encapsulate_fn)(void *ctx, unsigned char *out, size_t *outlen, unsigned char *secret, size_t *secretlen); static __attribute__((unused)) inline OSSL_FUNC_kem_encapsulate_fn *OSSL_FUNC_kem_encapsulate(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_encapsulate_fn *)opf->function; }
8679   
8680   
8681   
8682   typedef int (OSSL_FUNC_kem_decapsulate_init_fn)(void *ctx, void *provkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_kem_decapsulate_init_fn *OSSL_FUNC_kem_decapsulate_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_decapsulate_init_fn *)opf->function; }
8683   
8684   typedef int (OSSL_FUNC_kem_auth_decapsulate_init_fn)(void *ctx, void *provkey, void *authpubkey, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_kem_auth_decapsulate_init_fn *OSSL_FUNC_kem_auth_decapsulate_init(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_auth_decapsulate_init_fn *)opf->function; }
8685   
8686   
8687   typedef int (OSSL_FUNC_kem_decapsulate_fn)(void *ctx, unsigned char *out, size_t *outlen, const unsigned char *in, size_t inlen); static __attribute__((unused)) inline OSSL_FUNC_kem_decapsulate_fn *OSSL_FUNC_kem_decapsulate(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_decapsulate_fn *)opf->function; }
8688   
8689   
8690   typedef void (OSSL_FUNC_kem_freectx_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_kem_freectx_fn *OSSL_FUNC_kem_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_freectx_fn *)opf->function; }
8691   typedef void * (OSSL_FUNC_kem_dupctx_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_kem_dupctx_fn *OSSL_FUNC_kem_dupctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_dupctx_fn *)opf->function; }
8692   typedef int (OSSL_FUNC_kem_get_ctx_params_fn)(void *ctx, OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_kem_get_ctx_params_fn *OSSL_FUNC_kem_get_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_get_ctx_params_fn *)opf->function; }
8693   typedef const OSSL_PARAM * (OSSL_FUNC_kem_gettable_ctx_params_fn)(void *ctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_kem_gettable_ctx_params_fn *OSSL_FUNC_kem_gettable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_gettable_ctx_params_fn *)opf->function; }
8694   
8695   typedef int (OSSL_FUNC_kem_set_ctx_params_fn)(void *ctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_kem_set_ctx_params_fn *OSSL_FUNC_kem_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_set_ctx_params_fn *)opf->function; }
8696   
8697   typedef const OSSL_PARAM * (OSSL_FUNC_kem_settable_ctx_params_fn)(void *ctx, void *provctx); static __attribute__((unused)) inline OSSL_FUNC_kem_settable_ctx_params_fn *OSSL_FUNC_kem_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_kem_settable_ctx_params_fn *)opf->function; }
8698   # 889 "include/openssl/core_dispatch.h"
8699   typedef void * (OSSL_FUNC_encoder_newctx_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_encoder_newctx_fn *OSSL_FUNC_encoder_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_encoder_newctx_fn *)opf->function; }
8700   typedef void (OSSL_FUNC_encoder_freectx_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_encoder_freectx_fn *OSSL_FUNC_encoder_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_encoder_freectx_fn *)opf->function; }
8701   typedef int (OSSL_FUNC_encoder_get_params_fn)(OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_encoder_get_params_fn *OSSL_FUNC_encoder_get_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_encoder_get_params_fn *)opf->function; }
8702   typedef const OSSL_PARAM * (OSSL_FUNC_encoder_gettable_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_encoder_gettable_params_fn *OSSL_FUNC_encoder_gettable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_encoder_gettable_params_fn *)opf->function; }
8703   
8704   typedef int (OSSL_FUNC_encoder_set_ctx_params_fn)(void *ctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_encoder_set_ctx_params_fn *OSSL_FUNC_encoder_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_encoder_set_ctx_params_fn *)opf->function; }
8705   
8706   typedef const OSSL_PARAM * (OSSL_FUNC_encoder_settable_ctx_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_encoder_settable_ctx_params_fn *OSSL_FUNC_encoder_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_encoder_settable_ctx_params_fn *)opf->function; }
8707   
8708   
8709   typedef int (OSSL_FUNC_encoder_does_selection_fn)(void *provctx, int selection); static __attribute__((unused)) inline OSSL_FUNC_encoder_does_selection_fn *OSSL_FUNC_encoder_does_selection(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_encoder_does_selection_fn *)opf->function; }
8710   
8711   typedef int (OSSL_FUNC_encoder_encode_fn)(void *ctx, OSSL_CORE_BIO *out, const void *obj_raw, const OSSL_PARAM obj_abstract[], int selection, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg); static __attribute__((unused)) inline OSSL_FUNC_encoder_encode_fn *OSSL_FUNC_encoder_encode(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_encoder_encode_fn *)opf->function; }
8712   
8713   
8714   
8715   
8716   
8717   typedef void * (OSSL_FUNC_encoder_import_object_fn)(void *ctx, int selection, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_encoder_import_object_fn *OSSL_FUNC_encoder_import_object(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_encoder_import_object_fn *)opf->function; }
8718   
8719   typedef void (OSSL_FUNC_encoder_free_object_fn)(void *obj); static __attribute__((unused)) inline OSSL_FUNC_encoder_free_object_fn *OSSL_FUNC_encoder_free_object(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_encoder_free_object_fn *)opf->function; }
8720   # 920 "include/openssl/core_dispatch.h"
8721   typedef void * (OSSL_FUNC_decoder_newctx_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_decoder_newctx_fn *OSSL_FUNC_decoder_newctx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_decoder_newctx_fn *)opf->function; }
8722   typedef void (OSSL_FUNC_decoder_freectx_fn)(void *ctx); static __attribute__((unused)) inline OSSL_FUNC_decoder_freectx_fn *OSSL_FUNC_decoder_freectx(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_decoder_freectx_fn *)opf->function; }
8723   typedef int (OSSL_FUNC_decoder_get_params_fn)(OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_decoder_get_params_fn *OSSL_FUNC_decoder_get_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_decoder_get_params_fn *)opf->function; }
8724   typedef const OSSL_PARAM * (OSSL_FUNC_decoder_gettable_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_decoder_gettable_params_fn *OSSL_FUNC_decoder_gettable_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_decoder_gettable_params_fn *)opf->function; }
8725   
8726   typedef int (OSSL_FUNC_decoder_set_ctx_params_fn)(void *ctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_decoder_set_ctx_params_fn *OSSL_FUNC_decoder_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_decoder_set_ctx_params_fn *)opf->function; }
8727   
8728   typedef const OSSL_PARAM * (OSSL_FUNC_decoder_settable_ctx_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_decoder_settable_ctx_params_fn *OSSL_FUNC_decoder_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_decoder_settable_ctx_params_fn *)opf->function; }
8729   
8730   
8731   typedef int (OSSL_FUNC_decoder_does_selection_fn)(void *provctx, int selection); static __attribute__((unused)) inline OSSL_FUNC_decoder_does_selection_fn *OSSL_FUNC_decoder_does_selection(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_decoder_does_selection_fn *)opf->function; }
8732   
8733   typedef int (OSSL_FUNC_decoder_decode_fn)(void *ctx, OSSL_CORE_BIO *in, int selection, OSSL_CALLBACK *data_cb, void *data_cbarg, OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg); static __attribute__((unused)) inline OSSL_FUNC_decoder_decode_fn *OSSL_FUNC_decoder_decode(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_decoder_decode_fn *)opf->function; }
8734   
8735   
8736   
8737   typedef int (OSSL_FUNC_decoder_export_object_fn)(void *ctx, const void *objref, size_t objref_sz, OSSL_CALLBACK *export_cb, void *export_cbarg); static __attribute__((unused)) inline OSSL_FUNC_decoder_export_object_fn *OSSL_FUNC_decoder_export_object(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_decoder_export_object_fn *)opf->function; }
8738   # 962 "include/openssl/core_dispatch.h"
8739   typedef void * (OSSL_FUNC_store_open_fn)(void *provctx, const char *uri); static __attribute__((unused)) inline OSSL_FUNC_store_open_fn *OSSL_FUNC_store_open(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_store_open_fn *)opf->function; }
8740   typedef void * (OSSL_FUNC_store_attach_fn)(void *provctx, OSSL_CORE_BIO *in); static __attribute__((unused)) inline OSSL_FUNC_store_attach_fn *OSSL_FUNC_store_attach(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_store_attach_fn *)opf->function; }
8741   typedef const OSSL_PARAM * (OSSL_FUNC_store_settable_ctx_params_fn)(void *provctx); static __attribute__((unused)) inline OSSL_FUNC_store_settable_ctx_params_fn *OSSL_FUNC_store_settable_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_store_settable_ctx_params_fn *)opf->function; }
8742   
8743   typedef int (OSSL_FUNC_store_set_ctx_params_fn)(void *loaderctx, const OSSL_PARAM params[]); static __attribute__((unused)) inline OSSL_FUNC_store_set_ctx_params_fn *OSSL_FUNC_store_set_ctx_params(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_store_set_ctx_params_fn *)opf->function; }
8744   
8745   typedef int (OSSL_FUNC_store_load_fn)(void *loaderctx, OSSL_CALLBACK *object_cb, void *object_cbarg, OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg); static __attribute__((unused)) inline OSSL_FUNC_store_load_fn *OSSL_FUNC_store_load(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_store_load_fn *)opf->function; }
8746   
8747   
8748   
8749   typedef int (OSSL_FUNC_store_eof_fn)(void *loaderctx); static __attribute__((unused)) inline OSSL_FUNC_store_eof_fn *OSSL_FUNC_store_eof(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_store_eof_fn *)opf->function; }
8750   typedef int (OSSL_FUNC_store_close_fn)(void *loaderctx); static __attribute__((unused)) inline OSSL_FUNC_store_close_fn *OSSL_FUNC_store_close(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_store_close_fn *)opf->function; }
8751   typedef int (OSSL_FUNC_store_export_object_fn)(void *loaderctx, const void *objref, size_t objref_sz, OSSL_CALLBACK *export_cb, void *export_cbarg); static __attribute__((unused)) inline OSSL_FUNC_store_export_object_fn *OSSL_FUNC_store_export_object(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_store_export_object_fn *)opf->function; }
8752   
8753   
8754   typedef int (OSSL_FUNC_store_delete_fn)(void *provctx, const char *uri, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg); static __attribute__((unused)) inline OSSL_FUNC_store_delete_fn *OSSL_FUNC_store_delete(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_store_delete_fn *)opf->function; }
8755   
8756   
8757   typedef void * (OSSL_FUNC_store_open_ex_fn)(void *provctx, const char *uri, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg); static __attribute__((unused)) inline OSSL_FUNC_store_open_ex_fn *OSSL_FUNC_store_open_ex(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_store_open_ex_fn *)opf->function; }
8758   # 29 "include/openssl/evp.h" 2
8759   
8760   
8761   # 1 "include/openssl/evperr.h" 1
8762   # 13 "include/openssl/evperr.h"
8763           
8764   # 32 "include/openssl/evp.h" 2
8765   # 1 "include/openssl/params.h" 1
8766   # 13 "include/openssl/params.h"
8767           
8768   # 71 "include/openssl/params.h"
8769   OSSL_PARAM *OSSL_PARAM_locate(OSSL_PARAM *p, const char *key);
8770   const OSSL_PARAM *OSSL_PARAM_locate_const(const OSSL_PARAM *p, const char *key);
8771   
8772   
8773   OSSL_PARAM OSSL_PARAM_construct_int(const char *key, int *buf);
8774   OSSL_PARAM OSSL_PARAM_construct_uint(const char *key, unsigned int *buf);
8775   OSSL_PARAM OSSL_PARAM_construct_long(const char *key, long int *buf);
8776   OSSL_PARAM OSSL_PARAM_construct_ulong(const char *key, unsigned long int *buf);
8777   OSSL_PARAM OSSL_PARAM_construct_int32(const char *key, int32_t *buf);
8778   OSSL_PARAM OSSL_PARAM_construct_uint32(const char *key, uint32_t *buf);
8779   OSSL_PARAM OSSL_PARAM_construct_int64(const char *key, int64_t *buf);
8780   OSSL_PARAM OSSL_PARAM_construct_uint64(const char *key, uint64_t *buf);
8781   OSSL_PARAM OSSL_PARAM_construct_size_t(const char *key, size_t *buf);
8782   OSSL_PARAM OSSL_PARAM_construct_time_t(const char *key, time_t *buf);
8783   OSSL_PARAM OSSL_PARAM_construct_BN(const char *key, unsigned char *buf,
8784                                      size_t bsize);
8785   OSSL_PARAM OSSL_PARAM_construct_double(const char *key, double *buf);
8786   OSSL_PARAM OSSL_PARAM_construct_utf8_string(const char *key, char *buf,
8787                                               size_t bsize);
8788   OSSL_PARAM OSSL_PARAM_construct_utf8_ptr(const char *key, char **buf,
8789                                            size_t bsize);
8790   OSSL_PARAM OSSL_PARAM_construct_octet_string(const char *key, void *buf,
8791                                                size_t bsize);
8792   OSSL_PARAM OSSL_PARAM_construct_octet_ptr(const char *key, void **buf,
8793                                             size_t bsize);
8794   OSSL_PARAM OSSL_PARAM_construct_end(void);
8795   
8796   int OSSL_PARAM_allocate_from_text(OSSL_PARAM *to,
8797                                     const OSSL_PARAM *paramdefs,
8798                                     const char *key, const char *value,
8799                                     size_t value_n, int *found);
8800   
8801   int OSSL_PARAM_get_int(const OSSL_PARAM *p, int *val);
8802   int OSSL_PARAM_get_uint(const OSSL_PARAM *p, unsigned int *val);
8803   int OSSL_PARAM_get_long(const OSSL_PARAM *p, long int *val);
8804   int OSSL_PARAM_get_ulong(const OSSL_PARAM *p, unsigned long int *val);
8805   int OSSL_PARAM_get_int32(const OSSL_PARAM *p, int32_t *val);
8806   int OSSL_PARAM_get_uint32(const OSSL_PARAM *p, uint32_t *val);
8807   int OSSL_PARAM_get_int64(const OSSL_PARAM *p, int64_t *val);
8808   int OSSL_PARAM_get_uint64(const OSSL_PARAM *p, uint64_t *val);
8809   int OSSL_PARAM_get_size_t(const OSSL_PARAM *p, size_t *val);
8810   int OSSL_PARAM_get_time_t(const OSSL_PARAM *p, time_t *val);
8811   
8812   int OSSL_PARAM_set_int(OSSL_PARAM *p, int val);
8813   int OSSL_PARAM_set_uint(OSSL_PARAM *p, unsigned int val);
8814   int OSSL_PARAM_set_long(OSSL_PARAM *p, long int val);
8815   int OSSL_PARAM_set_ulong(OSSL_PARAM *p, unsigned long int val);
8816   int OSSL_PARAM_set_int32(OSSL_PARAM *p, int32_t val);
8817   int OSSL_PARAM_set_uint32(OSSL_PARAM *p, uint32_t val);
8818   int OSSL_PARAM_set_int64(OSSL_PARAM *p, int64_t val);
8819   int OSSL_PARAM_set_uint64(OSSL_PARAM *p, uint64_t val);
8820   int OSSL_PARAM_set_size_t(OSSL_PARAM *p, size_t val);
8821   int OSSL_PARAM_set_time_t(OSSL_PARAM *p, time_t val);
8822   
8823   int OSSL_PARAM_get_double(const OSSL_PARAM *p, double *val);
8824   int OSSL_PARAM_set_double(OSSL_PARAM *p, double val);
8825   
8826   int OSSL_PARAM_get_BN(const OSSL_PARAM *p, BIGNUM **val);
8827   int OSSL_PARAM_set_BN(OSSL_PARAM *p, const BIGNUM *val);
8828   
8829   int OSSL_PARAM_get_utf8_string(const OSSL_PARAM *p, char **val, size_t max_len);
8830   int OSSL_PARAM_set_utf8_string(OSSL_PARAM *p, const char *val);
8831   
8832   int OSSL_PARAM_get_octet_string(const OSSL_PARAM *p, void **val, size_t max_len,
8833                                   size_t *used_len);
8834   int OSSL_PARAM_set_octet_string(OSSL_PARAM *p, const void *val, size_t len);
8835   
8836   int OSSL_PARAM_get_utf8_ptr(const OSSL_PARAM *p, const char **val);
8837   int OSSL_PARAM_set_utf8_ptr(OSSL_PARAM *p, const char *val);
8838   
8839   int OSSL_PARAM_get_octet_ptr(const OSSL_PARAM *p, const void **val,
8840                                size_t *used_len);
8841   int OSSL_PARAM_set_octet_ptr(OSSL_PARAM *p, const void *val,
8842                                size_t used_len);
8843   
8844   int OSSL_PARAM_get_utf8_string_ptr(const OSSL_PARAM *p, const char **val);
8845   int OSSL_PARAM_get_octet_string_ptr(const OSSL_PARAM *p, const void **val,
8846                                       size_t *used_len);
8847   
8848   int OSSL_PARAM_modified(const OSSL_PARAM *p);
8849   void OSSL_PARAM_set_all_unmodified(OSSL_PARAM *p);
8850   
8851   OSSL_PARAM *OSSL_PARAM_dup(const OSSL_PARAM *p);
8852   OSSL_PARAM *OSSL_PARAM_merge(const OSSL_PARAM *p1, const OSSL_PARAM *p2);
8853   void OSSL_PARAM_free(OSSL_PARAM *p);
8854   # 33 "include/openssl/evp.h" 2
8855   # 44 "include/openssl/evp.h"
8856   # 1 "include/openssl/objects.h" 1
8857   # 12 "include/openssl/objects.h"
8858           
8859   
8860   
8861   
8862   
8863   
8864   
8865   # 1 "include/openssl/obj_mac.h" 1
8866   # 14 "include/openssl/obj_mac.h"
8867           
8868   # 20 "include/openssl/objects.h" 2
8869   
8870   
8871   # 1 "include/openssl/objectserr.h" 1
8872   # 13 "include/openssl/objectserr.h"
8873           
8874   # 23 "include/openssl/objects.h" 2
8875   # 43 "include/openssl/objects.h"
8876   typedef struct obj_name_st {
8877       int type;
8878       int alias;
8879       const char *name;
8880       const char *data;
8881   } OBJ_NAME;
8882   
8883   
8884   
8885   int OBJ_NAME_init(void);
8886   int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *),
8887                          int (*cmp_func) (const char *, const char *),
8888                          void (*free_func) (const char *, int, const char *));
8889   const char *OBJ_NAME_get(const char *name, int type);
8890   int OBJ_NAME_add(const char *name, int type, const char *data);
8891   int OBJ_NAME_remove(const char *name, int type);
8892   void OBJ_NAME_cleanup(int type);
8893   void OBJ_NAME_do_all(int type, void (*fn) (const OBJ_NAME *, void *arg),
8894                        void *arg);
8895   void OBJ_NAME_do_all_sorted(int type,
8896                               void (*fn) (const OBJ_NAME *, void *arg),
8897                               void *arg);
8898   
8899   extern ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *a);
8900   ASN1_OBJECT *OBJ_nid2obj(int n);
8901   const char *OBJ_nid2ln(int n);
8902   const char *OBJ_nid2sn(int n);
8903   int OBJ_obj2nid(const ASN1_OBJECT *o);
8904   ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name);
8905   int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name);
8906   int OBJ_txt2nid(const char *s);
8907   int OBJ_ln2nid(const char *s);
8908   int OBJ_sn2nid(const char *s);
8909   int OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b);
8910   const void *OBJ_bsearch_(const void *key, const void *base, int num, int size,
8911                            int (*cmp) (const void *, const void *));
8912   const void *OBJ_bsearch_ex_(const void *key, const void *base, int num,
8913                               int size,
8914                               int (*cmp) (const void *, const void *),
8915                               int flags);
8916   # 163 "include/openssl/objects.h"
8917   int OBJ_new_nid(int num);
8918   int OBJ_add_object(const ASN1_OBJECT *obj);
8919   int OBJ_create(const char *oid, const char *sn, const char *ln);
8920   
8921   
8922   
8923   int OBJ_create_objects(BIO *in);
8924   
8925   size_t OBJ_length(const ASN1_OBJECT *obj);
8926   const unsigned char *OBJ_get0_data(const ASN1_OBJECT *obj);
8927   
8928   int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid);
8929   int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid);
8930   int OBJ_add_sigid(int signid, int dig_id, int pkey_id);
8931   void OBJ_sigid_free(void);
8932   # 45 "include/openssl/evp.h" 2
8933   # 100 "include/openssl/evp.h"
8934   int EVP_set_default_properties(OSSL_LIB_CTX *libctx, const char *propq);
8935   int EVP_default_properties_is_fips_enabled(OSSL_LIB_CTX *libctx);
8936   int EVP_default_properties_enable_fips(OSSL_LIB_CTX *libctx, int enable);
8937   # 111 "include/openssl/evp.h"
8938   __attribute__((deprecated("Since OpenSSL " "3.0"))) EVP_MD *EVP_MD_meth_new(int md_type, int pkey_type);
8939   __attribute__((deprecated("Since OpenSSL " "3.0"))) EVP_MD *EVP_MD_meth_dup(const EVP_MD *md);
8940   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_MD_meth_free(EVP_MD *md);
8941   __attribute__((deprecated("Since OpenSSL " "3.0")))
8942   int EVP_MD_meth_set_input_blocksize(EVP_MD *md, int blocksize);
8943   __attribute__((deprecated("Since OpenSSL " "3.0")))
8944   int EVP_MD_meth_set_result_size(EVP_MD *md, int resultsize);
8945   __attribute__((deprecated("Since OpenSSL " "3.0")))
8946   int EVP_MD_meth_set_app_datasize(EVP_MD *md, int datasize);
8947   __attribute__((deprecated("Since OpenSSL " "3.0")))
8948   int EVP_MD_meth_set_flags(EVP_MD *md, unsigned long flags);
8949   __attribute__((deprecated("Since OpenSSL " "3.0")))
8950   int EVP_MD_meth_set_init(EVP_MD *md, int (*init)(EVP_MD_CTX *ctx));
8951   __attribute__((deprecated("Since OpenSSL " "3.0")))
8952   int EVP_MD_meth_set_update(EVP_MD *md, int (*update)(EVP_MD_CTX *ctx,
8953                                                        const void *data,
8954                                                        size_t count));
8955   __attribute__((deprecated("Since OpenSSL " "3.0")))
8956   int EVP_MD_meth_set_final(EVP_MD *md, int (*final)(EVP_MD_CTX *ctx,
8957                                                      unsigned char *md));
8958   __attribute__((deprecated("Since OpenSSL " "3.0")))
8959   int EVP_MD_meth_set_copy(EVP_MD *md, int (*copy)(EVP_MD_CTX *to,
8960                                                    const EVP_MD_CTX *from));
8961   __attribute__((deprecated("Since OpenSSL " "3.0")))
8962   int EVP_MD_meth_set_cleanup(EVP_MD *md, int (*cleanup)(EVP_MD_CTX *ctx));
8963   __attribute__((deprecated("Since OpenSSL " "3.0")))
8964   int EVP_MD_meth_set_ctrl(EVP_MD *md, int (*ctrl)(EVP_MD_CTX *ctx, int cmd,
8965                                                    int p1, void *p2));
8966   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EVP_MD_meth_get_input_blocksize(const EVP_MD *md);
8967   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EVP_MD_meth_get_result_size(const EVP_MD *md);
8968   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EVP_MD_meth_get_app_datasize(const EVP_MD *md);
8969   __attribute__((deprecated("Since OpenSSL " "3.0"))) unsigned long EVP_MD_meth_get_flags(const EVP_MD *md);
8970   __attribute__((deprecated("Since OpenSSL " "3.0")))
8971   int (*EVP_MD_meth_get_init(const EVP_MD *md))(EVP_MD_CTX *ctx);
8972   __attribute__((deprecated("Since OpenSSL " "3.0")))
8973   int (*EVP_MD_meth_get_update(const EVP_MD *md))(EVP_MD_CTX *ctx,
8974                                                   const void *data, size_t count);
8975   __attribute__((deprecated("Since OpenSSL " "3.0")))
8976   int (*EVP_MD_meth_get_final(const EVP_MD *md))(EVP_MD_CTX *ctx,
8977                                                  unsigned char *md);
8978   __attribute__((deprecated("Since OpenSSL " "3.0")))
8979   int (*EVP_MD_meth_get_copy(const EVP_MD *md))(EVP_MD_CTX *to,
8980                                                 const EVP_MD_CTX *from);
8981   __attribute__((deprecated("Since OpenSSL " "3.0")))
8982   int (*EVP_MD_meth_get_cleanup(const EVP_MD *md))(EVP_MD_CTX *ctx);
8983   __attribute__((deprecated("Since OpenSSL " "3.0")))
8984   int (*EVP_MD_meth_get_ctrl(const EVP_MD *md))(EVP_MD_CTX *ctx, int cmd,
8985                                                 int p1, void *p2);
8986   # 235 "include/openssl/evp.h"
8987   __attribute__((deprecated("Since OpenSSL " "3.0")))
8988   EVP_CIPHER *EVP_CIPHER_meth_new(int cipher_type, int block_size, int key_len);
8989   __attribute__((deprecated("Since OpenSSL " "3.0")))
8990   EVP_CIPHER *EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher);
8991   __attribute__((deprecated("Since OpenSSL " "3.0")))
8992   void EVP_CIPHER_meth_free(EVP_CIPHER *cipher);
8993   __attribute__((deprecated("Since OpenSSL " "3.0")))
8994   int EVP_CIPHER_meth_set_iv_length(EVP_CIPHER *cipher, int iv_len);
8995   __attribute__((deprecated("Since OpenSSL " "3.0")))
8996   int EVP_CIPHER_meth_set_flags(EVP_CIPHER *cipher, unsigned long flags);
8997   __attribute__((deprecated("Since OpenSSL " "3.0")))
8998   int EVP_CIPHER_meth_set_impl_ctx_size(EVP_CIPHER *cipher, int ctx_size);
8999   __attribute__((deprecated("Since OpenSSL " "3.0")))
9000   int EVP_CIPHER_meth_set_init(EVP_CIPHER *cipher,
9001                                int (*init) (EVP_CIPHER_CTX *ctx,
9002                                             const unsigned char *key,
9003                                             const unsigned char *iv,
9004                                             int enc));
9005   __attribute__((deprecated("Since OpenSSL " "3.0")))
9006   int EVP_CIPHER_meth_set_do_cipher(EVP_CIPHER *cipher,
9007                                     int (*do_cipher) (EVP_CIPHER_CTX *ctx,
9008                                                       unsigned char *out,
9009                                                       const unsigned char *in,
9010                                                       size_t inl));
9011   __attribute__((deprecated("Since OpenSSL " "3.0")))
9012   int EVP_CIPHER_meth_set_cleanup(EVP_CIPHER *cipher,
9013                                   int (*cleanup) (EVP_CIPHER_CTX *));
9014   __attribute__((deprecated("Since OpenSSL " "3.0")))
9015   int EVP_CIPHER_meth_set_set_asn1_params(EVP_CIPHER *cipher,
9016                                           int (*set_asn1_parameters) (EVP_CIPHER_CTX *,
9017                                                                       ASN1_TYPE *));
9018   __attribute__((deprecated("Since OpenSSL " "3.0")))
9019   int EVP_CIPHER_meth_set_get_asn1_params(EVP_CIPHER *cipher,
9020                                           int (*get_asn1_parameters) (EVP_CIPHER_CTX *,
9021                                                                       ASN1_TYPE *));
9022   __attribute__((deprecated("Since OpenSSL " "3.0")))
9023   int EVP_CIPHER_meth_set_ctrl(EVP_CIPHER *cipher,
9024                                int (*ctrl) (EVP_CIPHER_CTX *, int type,
9025                                             int arg, void *ptr));
9026   __attribute__((deprecated("Since OpenSSL " "3.0"))) int
9027   (*EVP_CIPHER_meth_get_init(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *ctx,
9028                                                         const unsigned char *key,
9029                                                         const unsigned char *iv,
9030                                                         int enc);
9031   __attribute__((deprecated("Since OpenSSL " "3.0"))) int
9032   (*EVP_CIPHER_meth_get_do_cipher(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *ctx,
9033                                                              unsigned char *out,
9034                                                              const unsigned char *in,
9035                                                              size_t inl);
9036   __attribute__((deprecated("Since OpenSSL " "3.0"))) int
9037   (*EVP_CIPHER_meth_get_cleanup(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *);
9038   __attribute__((deprecated("Since OpenSSL " "3.0"))) int
9039   (*EVP_CIPHER_meth_get_set_asn1_params(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *,
9040                                                                    ASN1_TYPE *);
9041   __attribute__((deprecated("Since OpenSSL " "3.0"))) int
9042   (*EVP_CIPHER_meth_get_get_asn1_params(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *,
9043                                                                    ASN1_TYPE *);
9044   __attribute__((deprecated("Since OpenSSL " "3.0"))) int
9045   (*EVP_CIPHER_meth_get_ctrl(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *, int type,
9046                                                         int arg, void *ptr);
9047   # 453 "include/openssl/evp.h"
9048   typedef struct {
9049       unsigned char *out;
9050       const unsigned char *inp;
9051       size_t len;
9052       unsigned int interleave;
9053   } EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM;
9054   # 483 "include/openssl/evp.h"
9055   typedef struct evp_cipher_info_st {
9056       const EVP_CIPHER *cipher;
9057       unsigned char iv[16];
9058   } EVP_CIPHER_INFO;
9059   
9060   
9061   
9062   typedef int (EVP_PBE_KEYGEN) (EVP_CIPHER_CTX *ctx, const char *pass,
9063                                 int passlen, ASN1_TYPE *param,
9064                                 const EVP_CIPHER *cipher, const EVP_MD *md,
9065                                 int en_de);
9066   
9067   typedef int (EVP_PBE_KEYGEN_EX) (EVP_CIPHER_CTX *ctx, const char *pass,
9068                                    int passlen, ASN1_TYPE *param,
9069                                    const EVP_CIPHER *cipher, const EVP_MD *md,
9070                                    int en_de, OSSL_LIB_CTX *libctx, const char *propq);
9071   # 536 "include/openssl/evp.h"
9072   int EVP_MD_get_type(const EVP_MD *md);
9073   
9074   
9075   const char *EVP_MD_get0_name(const EVP_MD *md);
9076   
9077   const char *EVP_MD_get0_description(const EVP_MD *md);
9078   int EVP_MD_is_a(const EVP_MD *md, const char *name);
9079   int EVP_MD_names_do_all(const EVP_MD *md,
9080                           void (*fn)(const char *name, void *data),
9081                           void *data);
9082   const OSSL_PROVIDER *EVP_MD_get0_provider(const EVP_MD *md);
9083   int EVP_MD_get_pkey_type(const EVP_MD *md);
9084   
9085   int EVP_MD_get_size(const EVP_MD *md);
9086   
9087   int EVP_MD_get_block_size(const EVP_MD *md);
9088   
9089   unsigned long EVP_MD_get_flags(const EVP_MD *md);
9090   
9091   
9092   const EVP_MD *EVP_MD_CTX_get0_md(const EVP_MD_CTX *ctx);
9093   EVP_MD *EVP_MD_CTX_get1_md(EVP_MD_CTX *ctx);
9094   
9095   __attribute__((deprecated("Since OpenSSL " "3.0")))
9096   const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx);
9097   __attribute__((deprecated("Since OpenSSL " "3.0")))
9098   int (*EVP_MD_CTX_update_fn(EVP_MD_CTX *ctx))(EVP_MD_CTX *ctx,
9099                                                const void *data, size_t count);
9100   __attribute__((deprecated("Since OpenSSL " "3.0")))
9101   void EVP_MD_CTX_set_update_fn(EVP_MD_CTX *ctx,
9102                                 int (*update) (EVP_MD_CTX *ctx,
9103                                                const void *data, size_t count));
9104   # 576 "include/openssl/evp.h"
9105   EVP_PKEY_CTX *EVP_MD_CTX_get_pkey_ctx(const EVP_MD_CTX *ctx);
9106   
9107   void EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx);
9108   void *EVP_MD_CTX_get0_md_data(const EVP_MD_CTX *ctx);
9109   
9110   
9111   int EVP_CIPHER_get_nid(const EVP_CIPHER *cipher);
9112   
9113   const char *EVP_CIPHER_get0_name(const EVP_CIPHER *cipher);
9114   
9115   const char *EVP_CIPHER_get0_description(const EVP_CIPHER *cipher);
9116   int EVP_CIPHER_is_a(const EVP_CIPHER *cipher, const char *name);
9117   int EVP_CIPHER_names_do_all(const EVP_CIPHER *cipher,
9118                               void (*fn)(const char *name, void *data),
9119                               void *data);
9120   const OSSL_PROVIDER *EVP_CIPHER_get0_provider(const EVP_CIPHER *cipher);
9121   int EVP_CIPHER_get_block_size(const EVP_CIPHER *cipher);
9122   
9123   
9124   __attribute__((deprecated("Since OpenSSL " "3.0")))
9125   int EVP_CIPHER_impl_ctx_size(const EVP_CIPHER *cipher);
9126   
9127   int EVP_CIPHER_get_key_length(const EVP_CIPHER *cipher);
9128   
9129   int EVP_CIPHER_get_iv_length(const EVP_CIPHER *cipher);
9130   
9131   unsigned long EVP_CIPHER_get_flags(const EVP_CIPHER *cipher);
9132   
9133   int EVP_CIPHER_get_mode(const EVP_CIPHER *cipher);
9134   
9135   int EVP_CIPHER_get_type(const EVP_CIPHER *cipher);
9136   
9137   EVP_CIPHER *EVP_CIPHER_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
9138                                const char *properties);
9139   int EVP_CIPHER_up_ref(EVP_CIPHER *cipher);
9140   void EVP_CIPHER_free(EVP_CIPHER *cipher);
9141   
9142   const EVP_CIPHER *EVP_CIPHER_CTX_get0_cipher(const EVP_CIPHER_CTX *ctx);
9143   EVP_CIPHER *EVP_CIPHER_CTX_get1_cipher(EVP_CIPHER_CTX *ctx);
9144   int EVP_CIPHER_CTX_is_encrypting(const EVP_CIPHER_CTX *ctx);
9145   
9146   int EVP_CIPHER_CTX_get_nid(const EVP_CIPHER_CTX *ctx);
9147   
9148   int EVP_CIPHER_CTX_get_block_size(const EVP_CIPHER_CTX *ctx);
9149   
9150   int EVP_CIPHER_CTX_get_key_length(const EVP_CIPHER_CTX *ctx);
9151   
9152   int EVP_CIPHER_CTX_get_iv_length(const EVP_CIPHER_CTX *ctx);
9153   
9154   int EVP_CIPHER_CTX_get_tag_length(const EVP_CIPHER_CTX *ctx);
9155   
9156   
9157   const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx);
9158   __attribute__((deprecated("Since OpenSSL " "3.0"))) const unsigned char *EVP_CIPHER_CTX_iv(const EVP_CIPHER_CTX *ctx);
9159   __attribute__((deprecated("Since OpenSSL " "3.0"))) const unsigned char *EVP_CIPHER_CTX_original_iv(const EVP_CIPHER_CTX *ctx);
9160   __attribute__((deprecated("Since OpenSSL " "3.0"))) unsigned char *EVP_CIPHER_CTX_iv_noconst(EVP_CIPHER_CTX *ctx);
9161   
9162   int EVP_CIPHER_CTX_get_updated_iv(EVP_CIPHER_CTX *ctx, void *buf, size_t len);
9163   int EVP_CIPHER_CTX_get_original_iv(EVP_CIPHER_CTX *ctx, void *buf, size_t len);
9164   
9165   __attribute__((deprecated("Since OpenSSL " "3.0")))
9166   unsigned char *EVP_CIPHER_CTX_buf_noconst(EVP_CIPHER_CTX *ctx);
9167   
9168   int EVP_CIPHER_CTX_get_num(const EVP_CIPHER_CTX *ctx);
9169   
9170   int EVP_CIPHER_CTX_set_num(EVP_CIPHER_CTX *ctx, int num);
9171   EVP_CIPHER_CTX *EVP_CIPHER_CTX_dup(const EVP_CIPHER_CTX *in);
9172   int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);
9173   void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx);
9174   void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data);
9175   void *EVP_CIPHER_CTX_get_cipher_data(const EVP_CIPHER_CTX *ctx);
9176   void *EVP_CIPHER_CTX_set_cipher_data(EVP_CIPHER_CTX *ctx, void *cipher_data);
9177   # 680 "include/openssl/evp.h"
9178    int EVP_Cipher(EVP_CIPHER_CTX *c,
9179                             unsigned char *out,
9180                             const unsigned char *in, unsigned int inl);
9181   # 693 "include/openssl/evp.h"
9182   int EVP_MD_get_params(const EVP_MD *digest, OSSL_PARAM params[]);
9183   int EVP_MD_CTX_set_params(EVP_MD_CTX *ctx, const OSSL_PARAM params[]);
9184   int EVP_MD_CTX_get_params(EVP_MD_CTX *ctx, OSSL_PARAM params[]);
9185   const OSSL_PARAM *EVP_MD_gettable_params(const EVP_MD *digest);
9186   const OSSL_PARAM *EVP_MD_settable_ctx_params(const EVP_MD *md);
9187   const OSSL_PARAM *EVP_MD_gettable_ctx_params(const EVP_MD *md);
9188   const OSSL_PARAM *EVP_MD_CTX_settable_params(EVP_MD_CTX *ctx);
9189   const OSSL_PARAM *EVP_MD_CTX_gettable_params(EVP_MD_CTX *ctx);
9190   int EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int cmd, int p1, void *p2);
9191   EVP_MD_CTX *EVP_MD_CTX_new(void);
9192   int EVP_MD_CTX_reset(EVP_MD_CTX *ctx);
9193   void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
9194   
9195   
9196   
9197    EVP_MD_CTX *EVP_MD_CTX_dup(const EVP_MD_CTX *in);
9198    int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in);
9199   void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags);
9200   void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags);
9201   int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags);
9202    int EVP_DigestInit_ex2(EVP_MD_CTX *ctx, const EVP_MD *type,
9203                                 const OSSL_PARAM params[]);
9204    int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type,
9205                                    ENGINE *impl);
9206    int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d,
9207                                   size_t cnt);
9208    int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md,
9209                                     unsigned int *s);
9210    int EVP_Digest(const void *data, size_t count,
9211                             unsigned char *md, unsigned int *size,
9212                             const EVP_MD *type, ENGINE *impl);
9213    int EVP_Q_digest(OSSL_LIB_CTX *libctx, const char *name,
9214                           const char *propq, const void *data, size_t datalen,
9215                           unsigned char *md, size_t *mdlen);
9216   
9217    int EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in);
9218    int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type);
9219    int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md,
9220                              unsigned int *s);
9221    int EVP_DigestFinalXOF(EVP_MD_CTX *ctx, unsigned char *out,
9222                                 size_t outlen);
9223    int EVP_DigestSqueeze(EVP_MD_CTX *ctx, unsigned char *out,
9224                                size_t outlen);
9225   
9226    EVP_MD *EVP_MD_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
9227                               const char *properties);
9228   
9229   int EVP_MD_up_ref(EVP_MD *md);
9230   void EVP_MD_free(EVP_MD *md);
9231   
9232   int EVP_read_pw_string(char *buf, int length, const char *prompt, int verify);
9233   int EVP_read_pw_string_min(char *buf, int minlen, int maxlen,
9234                              const char *prompt, int verify);
9235   void EVP_set_pw_prompt(const char *prompt);
9236   char *EVP_get_pw_prompt(void);
9237   
9238    int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
9239                             const unsigned char *salt,
9240                             const unsigned char *data, int datal, int count,
9241                             unsigned char *key, unsigned char *iv);
9242   
9243   void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags);
9244   void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags);
9245   int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags);
9246   
9247    int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
9248                              const unsigned char *key, const unsigned char *iv);
9249    int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx,
9250                                     const EVP_CIPHER *cipher, ENGINE *impl,
9251                                     const unsigned char *key,
9252                                     const unsigned char *iv);
9253    int EVP_EncryptInit_ex2(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
9254                                  const unsigned char *key,
9255                                  const unsigned char *iv,
9256                                  const OSSL_PARAM params[]);
9257    int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
9258                                    int *outl, const unsigned char *in, int inl);
9259    int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out,
9260                                      int *outl);
9261    int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out,
9262                                   int *outl);
9263   
9264    int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
9265                              const unsigned char *key, const unsigned char *iv);
9266    int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx,
9267                                     const EVP_CIPHER *cipher, ENGINE *impl,
9268                                     const unsigned char *key,
9269                                     const unsigned char *iv);
9270    int EVP_DecryptInit_ex2(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
9271                                  const unsigned char *key,
9272                                  const unsigned char *iv,
9273                                  const OSSL_PARAM params[]);
9274    int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
9275                                    int *outl, const unsigned char *in, int inl);
9276    int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm,
9277                               int *outl);
9278    int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm,
9279                                      int *outl);
9280   
9281    int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
9282                             const unsigned char *key, const unsigned char *iv,
9283                             int enc);
9284    int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx,
9285                                    const EVP_CIPHER *cipher, ENGINE *impl,
9286                                    const unsigned char *key,
9287                                    const unsigned char *iv, int enc);
9288    int EVP_CipherInit_ex2(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
9289                                 const unsigned char *key, const unsigned char *iv,
9290                                 int enc, const OSSL_PARAM params[]);
9291    int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
9292                               int *outl, const unsigned char *in, int inl);
9293    int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm,
9294                              int *outl);
9295    int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm,
9296                                 int *outl);
9297   
9298    int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s,
9299                            EVP_PKEY *pkey);
9300    int EVP_SignFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s,
9301                               EVP_PKEY *pkey, OSSL_LIB_CTX *libctx,
9302                               const char *propq);
9303   
9304    int EVP_DigestSign(EVP_MD_CTX *ctx, unsigned char *sigret,
9305                             size_t *siglen, const unsigned char *tbs,
9306                             size_t tbslen);
9307   
9308    int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
9309                              unsigned int siglen, EVP_PKEY *pkey);
9310    int EVP_VerifyFinal_ex(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
9311                                 unsigned int siglen, EVP_PKEY *pkey,
9312                                 OSSL_LIB_CTX *libctx, const char *propq);
9313   
9314    int EVP_DigestVerify(EVP_MD_CTX *ctx, const unsigned char *sigret,
9315                               size_t siglen, const unsigned char *tbs,
9316                               size_t tbslen);
9317   
9318    int EVP_DigestSignInit_ex(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
9319                             const char *mdname, OSSL_LIB_CTX *libctx,
9320                             const char *props, EVP_PKEY *pkey,
9321                             const OSSL_PARAM params[]);
9322    int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
9323                                     const EVP_MD *type, ENGINE *e,
9324                                     EVP_PKEY *pkey);
9325    int EVP_DigestSignUpdate(EVP_MD_CTX *ctx, const void *data, size_t dsize);
9326    int EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret,
9327                                  size_t *siglen);
9328   
9329    int EVP_DigestVerifyInit_ex(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
9330                               const char *mdname, OSSL_LIB_CTX *libctx,
9331                               const char *props, EVP_PKEY *pkey,
9332                               const OSSL_PARAM params[]);
9333    int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
9334                                   const EVP_MD *type, ENGINE *e,
9335                                   EVP_PKEY *pkey);
9336   int EVP_DigestVerifyUpdate(EVP_MD_CTX *ctx, const void *data, size_t dsize);
9337    int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sig,
9338                                    size_t siglen);
9339   
9340    int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
9341                           const unsigned char *ek, int ekl,
9342                           const unsigned char *iv, EVP_PKEY *priv);
9343    int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
9344   
9345    int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
9346                           unsigned char **ek, int *ekl, unsigned char *iv,
9347                           EVP_PKEY **pubk, int npubk);
9348    int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
9349   
9350   EVP_ENCODE_CTX *EVP_ENCODE_CTX_new(void);
9351   void EVP_ENCODE_CTX_free(EVP_ENCODE_CTX *ctx);
9352   int EVP_ENCODE_CTX_copy(EVP_ENCODE_CTX *dctx, const EVP_ENCODE_CTX *sctx);
9353   int EVP_ENCODE_CTX_num(EVP_ENCODE_CTX *ctx);
9354   void EVP_EncodeInit(EVP_ENCODE_CTX *ctx);
9355   int EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
9356                        const unsigned char *in, int inl);
9357   void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl);
9358   int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n);
9359   
9360   void EVP_DecodeInit(EVP_ENCODE_CTX *ctx);
9361   int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
9362                        const unsigned char *in, int inl);
9363   int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned
9364                       char *out, int *outl);
9365   int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
9366   
9367   
9368   
9369   
9370   
9371   EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void);
9372   int EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c);
9373   void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *c);
9374   int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen);
9375   int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad);
9376   int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
9377   int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key);
9378   int EVP_CIPHER_get_params(EVP_CIPHER *cipher, OSSL_PARAM params[]);
9379   int EVP_CIPHER_CTX_set_params(EVP_CIPHER_CTX *ctx, const OSSL_PARAM params[]);
9380   int EVP_CIPHER_CTX_get_params(EVP_CIPHER_CTX *ctx, OSSL_PARAM params[]);
9381   const OSSL_PARAM *EVP_CIPHER_gettable_params(const EVP_CIPHER *cipher);
9382   const OSSL_PARAM *EVP_CIPHER_settable_ctx_params(const EVP_CIPHER *cipher);
9383   const OSSL_PARAM *EVP_CIPHER_gettable_ctx_params(const EVP_CIPHER *cipher);
9384   const OSSL_PARAM *EVP_CIPHER_CTX_settable_params(EVP_CIPHER_CTX *ctx);
9385   const OSSL_PARAM *EVP_CIPHER_CTX_gettable_params(EVP_CIPHER_CTX *ctx);
9386   
9387   const BIO_METHOD *BIO_f_md(void);
9388   const BIO_METHOD *BIO_f_base64(void);
9389   const BIO_METHOD *BIO_f_cipher(void);
9390   const BIO_METHOD *BIO_f_reliable(void);
9391    int BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k,
9392                             const unsigned char *i, int enc);
9393   
9394   const EVP_MD *EVP_md_null(void);
9395   
9396   
9397   
9398   
9399   const EVP_MD *EVP_md4(void);
9400   
9401   
9402   const EVP_MD *EVP_md5(void);
9403   const EVP_MD *EVP_md5_sha1(void);
9404   
9405   
9406   const EVP_MD *EVP_blake2b512(void);
9407   const EVP_MD *EVP_blake2s256(void);
9408   
9409   const EVP_MD *EVP_sha1(void);
9410   const EVP_MD *EVP_sha224(void);
9411   const EVP_MD *EVP_sha256(void);
9412   const EVP_MD *EVP_sha384(void);
9413   const EVP_MD *EVP_sha512(void);
9414   const EVP_MD *EVP_sha512_224(void);
9415   const EVP_MD *EVP_sha512_256(void);
9416   const EVP_MD *EVP_sha3_224(void);
9417   const EVP_MD *EVP_sha3_256(void);
9418   const EVP_MD *EVP_sha3_384(void);
9419   const EVP_MD *EVP_sha3_512(void);
9420   const EVP_MD *EVP_shake128(void);
9421   const EVP_MD *EVP_shake256(void);
9422   
9423   
9424   const EVP_MD *EVP_mdc2(void);
9425   
9426   
9427   const EVP_MD *EVP_ripemd160(void);
9428   
9429   
9430   const EVP_MD *EVP_whirlpool(void);
9431   
9432   
9433   const EVP_MD *EVP_sm3(void);
9434   
9435   const EVP_CIPHER *EVP_enc_null(void);
9436   
9437   const EVP_CIPHER *EVP_des_ecb(void);
9438   const EVP_CIPHER *EVP_des_ede(void);
9439   const EVP_CIPHER *EVP_des_ede3(void);
9440   const EVP_CIPHER *EVP_des_ede_ecb(void);
9441   const EVP_CIPHER *EVP_des_ede3_ecb(void);
9442   const EVP_CIPHER *EVP_des_cfb64(void);
9443   
9444   const EVP_CIPHER *EVP_des_cfb1(void);
9445   const EVP_CIPHER *EVP_des_cfb8(void);
9446   const EVP_CIPHER *EVP_des_ede_cfb64(void);
9447   
9448   const EVP_CIPHER *EVP_des_ede3_cfb64(void);
9449   
9450   const EVP_CIPHER *EVP_des_ede3_cfb1(void);
9451   const EVP_CIPHER *EVP_des_ede3_cfb8(void);
9452   const EVP_CIPHER *EVP_des_ofb(void);
9453   const EVP_CIPHER *EVP_des_ede_ofb(void);
9454   const EVP_CIPHER *EVP_des_ede3_ofb(void);
9455   const EVP_CIPHER *EVP_des_cbc(void);
9456   const EVP_CIPHER *EVP_des_ede_cbc(void);
9457   const EVP_CIPHER *EVP_des_ede3_cbc(void);
9458   const EVP_CIPHER *EVP_desx_cbc(void);
9459   const EVP_CIPHER *EVP_des_ede3_wrap(void);
9460   
9461   
9462   
9463   
9464   
9465   
9466   
9467   const EVP_CIPHER *EVP_rc4(void);
9468   const EVP_CIPHER *EVP_rc4_40(void);
9469   
9470   const EVP_CIPHER *EVP_rc4_hmac_md5(void);
9471   
9472   
9473   
9474   const EVP_CIPHER *EVP_idea_ecb(void);
9475   const EVP_CIPHER *EVP_idea_cfb64(void);
9476   
9477   const EVP_CIPHER *EVP_idea_ofb(void);
9478   const EVP_CIPHER *EVP_idea_cbc(void);
9479   
9480   
9481   const EVP_CIPHER *EVP_rc2_ecb(void);
9482   const EVP_CIPHER *EVP_rc2_cbc(void);
9483   const EVP_CIPHER *EVP_rc2_40_cbc(void);
9484   const EVP_CIPHER *EVP_rc2_64_cbc(void);
9485   const EVP_CIPHER *EVP_rc2_cfb64(void);
9486   
9487   const EVP_CIPHER *EVP_rc2_ofb(void);
9488   
9489   
9490   const EVP_CIPHER *EVP_bf_ecb(void);
9491   const EVP_CIPHER *EVP_bf_cbc(void);
9492   const EVP_CIPHER *EVP_bf_cfb64(void);
9493   
9494   const EVP_CIPHER *EVP_bf_ofb(void);
9495   
9496   
9497   const EVP_CIPHER *EVP_cast5_ecb(void);
9498   const EVP_CIPHER *EVP_cast5_cbc(void);
9499   const EVP_CIPHER *EVP_cast5_cfb64(void);
9500   
9501   const EVP_CIPHER *EVP_cast5_ofb(void);
9502   # 1021 "include/openssl/evp.h"
9503   const EVP_CIPHER *EVP_aes_128_ecb(void);
9504   const EVP_CIPHER *EVP_aes_128_cbc(void);
9505   const EVP_CIPHER *EVP_aes_128_cfb1(void);
9506   const EVP_CIPHER *EVP_aes_128_cfb8(void);
9507   const EVP_CIPHER *EVP_aes_128_cfb128(void);
9508   
9509   const EVP_CIPHER *EVP_aes_128_ofb(void);
9510   const EVP_CIPHER *EVP_aes_128_ctr(void);
9511   const EVP_CIPHER *EVP_aes_128_ccm(void);
9512   const EVP_CIPHER *EVP_aes_128_gcm(void);
9513   const EVP_CIPHER *EVP_aes_128_xts(void);
9514   const EVP_CIPHER *EVP_aes_128_wrap(void);
9515   const EVP_CIPHER *EVP_aes_128_wrap_pad(void);
9516   
9517   const EVP_CIPHER *EVP_aes_128_ocb(void);
9518   
9519   const EVP_CIPHER *EVP_aes_192_ecb(void);
9520   const EVP_CIPHER *EVP_aes_192_cbc(void);
9521   const EVP_CIPHER *EVP_aes_192_cfb1(void);
9522   const EVP_CIPHER *EVP_aes_192_cfb8(void);
9523   const EVP_CIPHER *EVP_aes_192_cfb128(void);
9524   
9525   const EVP_CIPHER *EVP_aes_192_ofb(void);
9526   const EVP_CIPHER *EVP_aes_192_ctr(void);
9527   const EVP_CIPHER *EVP_aes_192_ccm(void);
9528   const EVP_CIPHER *EVP_aes_192_gcm(void);
9529   const EVP_CIPHER *EVP_aes_192_wrap(void);
9530   const EVP_CIPHER *EVP_aes_192_wrap_pad(void);
9531   
9532   const EVP_CIPHER *EVP_aes_192_ocb(void);
9533   
9534   const EVP_CIPHER *EVP_aes_256_ecb(void);
9535   const EVP_CIPHER *EVP_aes_256_cbc(void);
9536   const EVP_CIPHER *EVP_aes_256_cfb1(void);
9537   const EVP_CIPHER *EVP_aes_256_cfb8(void);
9538   const EVP_CIPHER *EVP_aes_256_cfb128(void);
9539   
9540   const EVP_CIPHER *EVP_aes_256_ofb(void);
9541   const EVP_CIPHER *EVP_aes_256_ctr(void);
9542   const EVP_CIPHER *EVP_aes_256_ccm(void);
9543   const EVP_CIPHER *EVP_aes_256_gcm(void);
9544   const EVP_CIPHER *EVP_aes_256_xts(void);
9545   const EVP_CIPHER *EVP_aes_256_wrap(void);
9546   const EVP_CIPHER *EVP_aes_256_wrap_pad(void);
9547   
9548   const EVP_CIPHER *EVP_aes_256_ocb(void);
9549   
9550   const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha1(void);
9551   const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha1(void);
9552   const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha256(void);
9553   const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha256(void);
9554   
9555   const EVP_CIPHER *EVP_aria_128_ecb(void);
9556   const EVP_CIPHER *EVP_aria_128_cbc(void);
9557   const EVP_CIPHER *EVP_aria_128_cfb1(void);
9558   const EVP_CIPHER *EVP_aria_128_cfb8(void);
9559   const EVP_CIPHER *EVP_aria_128_cfb128(void);
9560   
9561   const EVP_CIPHER *EVP_aria_128_ctr(void);
9562   const EVP_CIPHER *EVP_aria_128_ofb(void);
9563   const EVP_CIPHER *EVP_aria_128_gcm(void);
9564   const EVP_CIPHER *EVP_aria_128_ccm(void);
9565   const EVP_CIPHER *EVP_aria_192_ecb(void);
9566   const EVP_CIPHER *EVP_aria_192_cbc(void);
9567   const EVP_CIPHER *EVP_aria_192_cfb1(void);
9568   const EVP_CIPHER *EVP_aria_192_cfb8(void);
9569   const EVP_CIPHER *EVP_aria_192_cfb128(void);
9570   
9571   const EVP_CIPHER *EVP_aria_192_ctr(void);
9572   const EVP_CIPHER *EVP_aria_192_ofb(void);
9573   const EVP_CIPHER *EVP_aria_192_gcm(void);
9574   const EVP_CIPHER *EVP_aria_192_ccm(void);
9575   const EVP_CIPHER *EVP_aria_256_ecb(void);
9576   const EVP_CIPHER *EVP_aria_256_cbc(void);
9577   const EVP_CIPHER *EVP_aria_256_cfb1(void);
9578   const EVP_CIPHER *EVP_aria_256_cfb8(void);
9579   const EVP_CIPHER *EVP_aria_256_cfb128(void);
9580   
9581   const EVP_CIPHER *EVP_aria_256_ctr(void);
9582   const EVP_CIPHER *EVP_aria_256_ofb(void);
9583   const EVP_CIPHER *EVP_aria_256_gcm(void);
9584   const EVP_CIPHER *EVP_aria_256_ccm(void);
9585   
9586   
9587   const EVP_CIPHER *EVP_camellia_128_ecb(void);
9588   const EVP_CIPHER *EVP_camellia_128_cbc(void);
9589   const EVP_CIPHER *EVP_camellia_128_cfb1(void);
9590   const EVP_CIPHER *EVP_camellia_128_cfb8(void);
9591   const EVP_CIPHER *EVP_camellia_128_cfb128(void);
9592   
9593   const EVP_CIPHER *EVP_camellia_128_ofb(void);
9594   const EVP_CIPHER *EVP_camellia_128_ctr(void);
9595   const EVP_CIPHER *EVP_camellia_192_ecb(void);
9596   const EVP_CIPHER *EVP_camellia_192_cbc(void);
9597   const EVP_CIPHER *EVP_camellia_192_cfb1(void);
9598   const EVP_CIPHER *EVP_camellia_192_cfb8(void);
9599   const EVP_CIPHER *EVP_camellia_192_cfb128(void);
9600   
9601   const EVP_CIPHER *EVP_camellia_192_ofb(void);
9602   const EVP_CIPHER *EVP_camellia_192_ctr(void);
9603   const EVP_CIPHER *EVP_camellia_256_ecb(void);
9604   const EVP_CIPHER *EVP_camellia_256_cbc(void);
9605   const EVP_CIPHER *EVP_camellia_256_cfb1(void);
9606   const EVP_CIPHER *EVP_camellia_256_cfb8(void);
9607   const EVP_CIPHER *EVP_camellia_256_cfb128(void);
9608   
9609   const EVP_CIPHER *EVP_camellia_256_ofb(void);
9610   const EVP_CIPHER *EVP_camellia_256_ctr(void);
9611   
9612   
9613   const EVP_CIPHER *EVP_chacha20(void);
9614   
9615   const EVP_CIPHER *EVP_chacha20_poly1305(void);
9616   
9617   
9618   
9619   
9620   const EVP_CIPHER *EVP_seed_ecb(void);
9621   const EVP_CIPHER *EVP_seed_cbc(void);
9622   const EVP_CIPHER *EVP_seed_cfb128(void);
9623   
9624   const EVP_CIPHER *EVP_seed_ofb(void);
9625   
9626   
9627   
9628   const EVP_CIPHER *EVP_sm4_ecb(void);
9629   const EVP_CIPHER *EVP_sm4_cbc(void);
9630   const EVP_CIPHER *EVP_sm4_cfb128(void);
9631   
9632   const EVP_CIPHER *EVP_sm4_ofb(void);
9633   const EVP_CIPHER *EVP_sm4_ctr(void);
9634   # 1177 "include/openssl/evp.h"
9635   int EVP_add_cipher(const EVP_CIPHER *cipher);
9636   int EVP_add_digest(const EVP_MD *digest);
9637   
9638   const EVP_CIPHER *EVP_get_cipherbyname(const char *name);
9639   const EVP_MD *EVP_get_digestbyname(const char *name);
9640   
9641   void EVP_CIPHER_do_all(void (*fn) (const EVP_CIPHER *ciph,
9642                                      const char *from, const char *to, void *x),
9643                          void *arg);
9644   void EVP_CIPHER_do_all_sorted(void (*fn)
9645                                  (const EVP_CIPHER *ciph, const char *from,
9646                                   const char *to, void *x), void *arg);
9647   void EVP_CIPHER_do_all_provided(OSSL_LIB_CTX *libctx,
9648                                   void (*fn)(EVP_CIPHER *cipher, void *arg),
9649                                   void *arg);
9650   
9651   void EVP_MD_do_all(void (*fn) (const EVP_MD *ciph,
9652                                  const char *from, const char *to, void *x),
9653                      void *arg);
9654   void EVP_MD_do_all_sorted(void (*fn)
9655                              (const EVP_MD *ciph, const char *from,
9656                               const char *to, void *x), void *arg);
9657   void EVP_MD_do_all_provided(OSSL_LIB_CTX *libctx,
9658                               void (*fn)(EVP_MD *md, void *arg),
9659                               void *arg);
9660   
9661   
9662   
9663   EVP_MAC *EVP_MAC_fetch(OSSL_LIB_CTX *libctx, const char *algorithm,
9664                          const char *properties);
9665   int EVP_MAC_up_ref(EVP_MAC *mac);
9666   void EVP_MAC_free(EVP_MAC *mac);
9667   const char *EVP_MAC_get0_name(const EVP_MAC *mac);
9668   const char *EVP_MAC_get0_description(const EVP_MAC *mac);
9669   int EVP_MAC_is_a(const EVP_MAC *mac, const char *name);
9670   const OSSL_PROVIDER *EVP_MAC_get0_provider(const EVP_MAC *mac);
9671   int EVP_MAC_get_params(EVP_MAC *mac, OSSL_PARAM params[]);
9672   
9673   EVP_MAC_CTX *EVP_MAC_CTX_new(EVP_MAC *mac);
9674   void EVP_MAC_CTX_free(EVP_MAC_CTX *ctx);
9675   EVP_MAC_CTX *EVP_MAC_CTX_dup(const EVP_MAC_CTX *src);
9676   EVP_MAC *EVP_MAC_CTX_get0_mac(EVP_MAC_CTX *ctx);
9677   int EVP_MAC_CTX_get_params(EVP_MAC_CTX *ctx, OSSL_PARAM params[]);
9678   int EVP_MAC_CTX_set_params(EVP_MAC_CTX *ctx, const OSSL_PARAM params[]);
9679   
9680   size_t EVP_MAC_CTX_get_mac_size(EVP_MAC_CTX *ctx);
9681   size_t EVP_MAC_CTX_get_block_size(EVP_MAC_CTX *ctx);
9682   unsigned char *EVP_Q_mac(OSSL_LIB_CTX *libctx, const char *name, const char *propq,
9683                            const char *subalg, const OSSL_PARAM *params,
9684                            const void *key, size_t keylen,
9685                            const unsigned char *data, size_t datalen,
9686                            unsigned char *out, size_t outsize, size_t *outlen);
9687   int EVP_MAC_init(EVP_MAC_CTX *ctx, const unsigned char *key, size_t keylen,
9688                    const OSSL_PARAM params[]);
9689   int EVP_MAC_update(EVP_MAC_CTX *ctx, const unsigned char *data, size_t datalen);
9690   int EVP_MAC_final(EVP_MAC_CTX *ctx,
9691                     unsigned char *out, size_t *outl, size_t outsize);
9692   int EVP_MAC_finalXOF(EVP_MAC_CTX *ctx, unsigned char *out, size_t outsize);
9693   const OSSL_PARAM *EVP_MAC_gettable_params(const EVP_MAC *mac);
9694   const OSSL_PARAM *EVP_MAC_gettable_ctx_params(const EVP_MAC *mac);
9695   const OSSL_PARAM *EVP_MAC_settable_ctx_params(const EVP_MAC *mac);
9696   const OSSL_PARAM *EVP_MAC_CTX_gettable_params(EVP_MAC_CTX *ctx);
9697   const OSSL_PARAM *EVP_MAC_CTX_settable_params(EVP_MAC_CTX *ctx);
9698   
9699   void EVP_MAC_do_all_provided(OSSL_LIB_CTX *libctx,
9700                                void (*fn)(EVP_MAC *mac, void *arg),
9701                                void *arg);
9702   int EVP_MAC_names_do_all(const EVP_MAC *mac,
9703                            void (*fn)(const char *name, void *data),
9704                            void *data);
9705   
9706   
9707   EVP_RAND *EVP_RAND_fetch(OSSL_LIB_CTX *libctx, const char *algorithm,
9708                            const char *properties);
9709   int EVP_RAND_up_ref(EVP_RAND *rand);
9710   void EVP_RAND_free(EVP_RAND *rand);
9711   const char *EVP_RAND_get0_name(const EVP_RAND *rand);
9712   const char *EVP_RAND_get0_description(const EVP_RAND *md);
9713   int EVP_RAND_is_a(const EVP_RAND *rand, const char *name);
9714   const OSSL_PROVIDER *EVP_RAND_get0_provider(const EVP_RAND *rand);
9715   int EVP_RAND_get_params(EVP_RAND *rand, OSSL_PARAM params[]);
9716   
9717   EVP_RAND_CTX *EVP_RAND_CTX_new(EVP_RAND *rand, EVP_RAND_CTX *parent);
9718   int EVP_RAND_CTX_up_ref(EVP_RAND_CTX *ctx);
9719   void EVP_RAND_CTX_free(EVP_RAND_CTX *ctx);
9720   EVP_RAND *EVP_RAND_CTX_get0_rand(EVP_RAND_CTX *ctx);
9721   int EVP_RAND_CTX_get_params(EVP_RAND_CTX *ctx, OSSL_PARAM params[]);
9722   int EVP_RAND_CTX_set_params(EVP_RAND_CTX *ctx, const OSSL_PARAM params[]);
9723   const OSSL_PARAM *EVP_RAND_gettable_params(const EVP_RAND *rand);
9724   const OSSL_PARAM *EVP_RAND_gettable_ctx_params(const EVP_RAND *rand);
9725   const OSSL_PARAM *EVP_RAND_settable_ctx_params(const EVP_RAND *rand);
9726   const OSSL_PARAM *EVP_RAND_CTX_gettable_params(EVP_RAND_CTX *ctx);
9727   const OSSL_PARAM *EVP_RAND_CTX_settable_params(EVP_RAND_CTX *ctx);
9728   
9729   void EVP_RAND_do_all_provided(OSSL_LIB_CTX *libctx,
9730                                 void (*fn)(EVP_RAND *rand, void *arg),
9731                                 void *arg);
9732   int EVP_RAND_names_do_all(const EVP_RAND *rand,
9733                             void (*fn)(const char *name, void *data),
9734                             void *data);
9735   
9736    int EVP_RAND_instantiate(EVP_RAND_CTX *ctx, unsigned int strength,
9737                                   int prediction_resistance,
9738                                   const unsigned char *pstr, size_t pstr_len,
9739                                   const OSSL_PARAM params[]);
9740   int EVP_RAND_uninstantiate(EVP_RAND_CTX *ctx);
9741    int EVP_RAND_generate(EVP_RAND_CTX *ctx, unsigned char *out,
9742                                size_t outlen, unsigned int strength,
9743                                int prediction_resistance,
9744                                const unsigned char *addin, size_t addin_len);
9745   int EVP_RAND_reseed(EVP_RAND_CTX *ctx, int prediction_resistance,
9746                       const unsigned char *ent, size_t ent_len,
9747                       const unsigned char *addin, size_t addin_len);
9748    int EVP_RAND_nonce(EVP_RAND_CTX *ctx, unsigned char *out, size_t outlen);
9749    int EVP_RAND_enable_locking(EVP_RAND_CTX *ctx);
9750   
9751   int EVP_RAND_verify_zeroization(EVP_RAND_CTX *ctx);
9752   unsigned int EVP_RAND_get_strength(EVP_RAND_CTX *ctx);
9753   int EVP_RAND_get_state(EVP_RAND_CTX *ctx);
9754   
9755   
9756   
9757   
9758   
9759   
9760   
9761   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EVP_PKEY_decrypt_old(unsigned char *dec_key,
9762                                             const unsigned char *enc_key,
9763                                             int enc_key_len,
9764                                             EVP_PKEY *private_key);
9765   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EVP_PKEY_encrypt_old(unsigned char *enc_key,
9766                                             const unsigned char *key,
9767                                             int key_len, EVP_PKEY *pub_key);
9768   
9769   int EVP_PKEY_is_a(const EVP_PKEY *pkey, const char *name);
9770   int EVP_PKEY_type_names_do_all(const EVP_PKEY *pkey,
9771                                  void (*fn)(const char *name, void *data),
9772                                  void *data);
9773   int EVP_PKEY_type(int type);
9774   int EVP_PKEY_get_id(const EVP_PKEY *pkey);
9775   
9776   int EVP_PKEY_get_base_id(const EVP_PKEY *pkey);
9777   
9778   int EVP_PKEY_get_bits(const EVP_PKEY *pkey);
9779   
9780   int EVP_PKEY_get_security_bits(const EVP_PKEY *pkey);
9781   
9782   int EVP_PKEY_get_size(const EVP_PKEY *pkey);
9783   
9784   int EVP_PKEY_can_sign(const EVP_PKEY *pkey);
9785   int EVP_PKEY_set_type(EVP_PKEY *pkey, int type);
9786   int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len);
9787   int EVP_PKEY_set_type_by_keymgmt(EVP_PKEY *pkey, EVP_KEYMGMT *keymgmt);
9788   
9789   
9790   __attribute__((deprecated("Since OpenSSL " "3.0")))
9791   int EVP_PKEY_set1_engine(EVP_PKEY *pkey, ENGINE *e);
9792   __attribute__((deprecated("Since OpenSSL " "3.0")))
9793   ENGINE *EVP_PKEY_get0_engine(const EVP_PKEY *pkey);
9794   
9795   __attribute__((deprecated("Since OpenSSL " "3.0")))
9796   int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
9797   __attribute__((deprecated("Since OpenSSL " "3.0")))
9798   void *EVP_PKEY_get0(const EVP_PKEY *pkey);
9799   __attribute__((deprecated("Since OpenSSL " "3.0")))
9800   const unsigned char *EVP_PKEY_get0_hmac(const EVP_PKEY *pkey, size_t *len);
9801   
9802   __attribute__((deprecated("Since OpenSSL " "3.0")))
9803   const unsigned char *EVP_PKEY_get0_poly1305(const EVP_PKEY *pkey, size_t *len);
9804   
9805   
9806   __attribute__((deprecated("Since OpenSSL " "3.0")))
9807   const unsigned char *EVP_PKEY_get0_siphash(const EVP_PKEY *pkey, size_t *len);
9808   
9809   
9810   struct rsa_st;
9811   __attribute__((deprecated("Since OpenSSL " "3.0")))
9812   int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, struct rsa_st *key);
9813   __attribute__((deprecated("Since OpenSSL " "3.0")))
9814   const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
9815   __attribute__((deprecated("Since OpenSSL " "3.0")))
9816   struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
9817   
9818   
9819   struct dsa_st;
9820   __attribute__((deprecated("Since OpenSSL " "3.0")))
9821   int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, struct dsa_st *key);
9822   __attribute__((deprecated("Since OpenSSL " "3.0")))
9823   const struct dsa_st *EVP_PKEY_get0_DSA(const EVP_PKEY *pkey);
9824   __attribute__((deprecated("Since OpenSSL " "3.0")))
9825   struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);
9826   
9827   
9828   
9829   struct dh_st;
9830   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EVP_PKEY_set1_DH(EVP_PKEY *pkey, struct dh_st *key);
9831   __attribute__((deprecated("Since OpenSSL " "3.0"))) const struct dh_st *EVP_PKEY_get0_DH(const EVP_PKEY *pkey);
9832   __attribute__((deprecated("Since OpenSSL " "3.0"))) struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey);
9833   
9834   
9835   
9836   struct ec_key_st;
9837   __attribute__((deprecated("Since OpenSSL " "3.0")))
9838   int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, struct ec_key_st *key);
9839   __attribute__((deprecated("Since OpenSSL " "3.0")))
9840   const struct ec_key_st *EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey);
9841   __attribute__((deprecated("Since OpenSSL " "3.0")))
9842   struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
9843   
9844   
9845   
9846   EVP_PKEY *EVP_PKEY_new(void);
9847   int EVP_PKEY_up_ref(EVP_PKEY *pkey);
9848   EVP_PKEY *EVP_PKEY_dup(EVP_PKEY *pkey);
9849   void EVP_PKEY_free(EVP_PKEY *pkey);
9850   const char *EVP_PKEY_get0_description(const EVP_PKEY *pkey);
9851   const OSSL_PROVIDER *EVP_PKEY_get0_provider(const EVP_PKEY *key);
9852   
9853   EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp,
9854                           long length);
9855   int i2d_PublicKey(const EVP_PKEY *a, unsigned char **pp);
9856   
9857   
9858   EVP_PKEY *d2i_PrivateKey_ex(int type, EVP_PKEY **a, const unsigned char **pp,
9859                               long length, OSSL_LIB_CTX *libctx,
9860                               const char *propq);
9861   EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp,
9862                            long length);
9863   EVP_PKEY *d2i_AutoPrivateKey_ex(EVP_PKEY **a, const unsigned char **pp,
9864                                   long length, OSSL_LIB_CTX *libctx,
9865                                   const char *propq);
9866   EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp,
9867                                long length);
9868   int i2d_PrivateKey(const EVP_PKEY *a, unsigned char **pp);
9869   
9870   int i2d_KeyParams(const EVP_PKEY *a, unsigned char **pp);
9871   EVP_PKEY *d2i_KeyParams(int type, EVP_PKEY **a, const unsigned char **pp,
9872                           long length);
9873   int i2d_KeyParams_bio(BIO *bp, const EVP_PKEY *pkey);
9874   EVP_PKEY *d2i_KeyParams_bio(int type, EVP_PKEY **a, BIO *in);
9875   
9876   int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from);
9877   int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey);
9878   int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode);
9879   int EVP_PKEY_parameters_eq(const EVP_PKEY *a, const EVP_PKEY *b);
9880   int EVP_PKEY_eq(const EVP_PKEY *a, const EVP_PKEY *b);
9881   
9882   
9883   __attribute__((deprecated("Since OpenSSL " "3.0")))
9884   int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b);
9885   __attribute__((deprecated("Since OpenSSL " "3.0")))
9886   int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
9887   
9888   
9889   int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey,
9890                             int indent, ASN1_PCTX *pctx);
9891   int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey,
9892                              int indent, ASN1_PCTX *pctx);
9893   int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey,
9894                             int indent, ASN1_PCTX *pctx);
9895   
9896   int EVP_PKEY_print_public_fp(FILE *fp, const EVP_PKEY *pkey,
9897                                int indent, ASN1_PCTX *pctx);
9898   int EVP_PKEY_print_private_fp(FILE *fp, const EVP_PKEY *pkey,
9899                                 int indent, ASN1_PCTX *pctx);
9900   int EVP_PKEY_print_params_fp(FILE *fp, const EVP_PKEY *pkey,
9901                                int indent, ASN1_PCTX *pctx);
9902   
9903   
9904   int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid);
9905   int EVP_PKEY_get_default_digest_name(EVP_PKEY *pkey,
9906                                        char *mdname, size_t mdname_sz);
9907   int EVP_PKEY_digestsign_supports_digest(EVP_PKEY *pkey, OSSL_LIB_CTX *libctx,
9908                                           const char *name, const char *propq);
9909   # 1461 "include/openssl/evp.h"
9910   int EVP_PKEY_set1_encoded_public_key(EVP_PKEY *pkey,
9911                                        const unsigned char *pub, size_t publen);
9912   # 1473 "include/openssl/evp.h"
9913   size_t EVP_PKEY_get1_encoded_public_key(EVP_PKEY *pkey, unsigned char **ppub);
9914   
9915   
9916   int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
9917   int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
9918   
9919   
9920   int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
9921   int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
9922   
9923   
9924   int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
9925                          ASN1_TYPE *param, const EVP_CIPHER *cipher,
9926                          const EVP_MD *md, int en_de);
9927   int PKCS5_PBE_keyivgen_ex(EVP_CIPHER_CTX *cctx, const char *pass, int passlen,
9928                             ASN1_TYPE *param, const EVP_CIPHER *cipher,
9929                             const EVP_MD *md, int en_de, OSSL_LIB_CTX *libctx,
9930                             const char *propq);
9931   int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
9932                              const unsigned char *salt, int saltlen, int iter,
9933                              int keylen, unsigned char *out);
9934   int PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
9935                         const unsigned char *salt, int saltlen, int iter,
9936                         const EVP_MD *digest, int keylen, unsigned char *out);
9937   int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
9938                             ASN1_TYPE *param, const EVP_CIPHER *cipher,
9939                             const EVP_MD *md, int en_de);
9940   int PKCS5_v2_PBE_keyivgen_ex(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
9941                                ASN1_TYPE *param, const EVP_CIPHER *cipher,
9942                                const EVP_MD *md, int en_de,
9943                                OSSL_LIB_CTX *libctx, const char *propq);
9944   
9945   
9946   int EVP_PBE_scrypt(const char *pass, size_t passlen,
9947                      const unsigned char *salt, size_t saltlen,
9948                      uint64_t N, uint64_t r, uint64_t p, uint64_t maxmem,
9949                      unsigned char *key, size_t keylen);
9950   int EVP_PBE_scrypt_ex(const char *pass, size_t passlen,
9951                         const unsigned char *salt, size_t saltlen,
9952                         uint64_t N, uint64_t r, uint64_t p, uint64_t maxmem,
9953                         unsigned char *key, size_t keylen,
9954                         OSSL_LIB_CTX *ctx, const char *propq);
9955   
9956   int PKCS5_v2_scrypt_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass,
9957                                int passlen, ASN1_TYPE *param,
9958                                const EVP_CIPHER *c, const EVP_MD *md, int en_de);
9959   int PKCS5_v2_scrypt_keyivgen_ex(EVP_CIPHER_CTX *ctx, const char *pass,
9960                                   int passlen, ASN1_TYPE *param,
9961                                   const EVP_CIPHER *c, const EVP_MD *md, int en_de,
9962                                   OSSL_LIB_CTX *libctx, const char *propq);
9963   
9964   
9965   void PKCS5_PBE_add(void);
9966   
9967   int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
9968                          ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de);
9969   
9970   int EVP_PBE_CipherInit_ex(ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
9971                             ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de,
9972                             OSSL_LIB_CTX *libctx, const char *propq);
9973   # 1543 "include/openssl/evp.h"
9974   int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid,
9975                            int md_nid, EVP_PBE_KEYGEN *keygen);
9976   int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
9977                       EVP_PBE_KEYGEN *keygen);
9978   int EVP_PBE_find(int type, int pbe_nid, int *pcnid, int *pmnid,
9979                    EVP_PBE_KEYGEN **pkeygen);
9980   int EVP_PBE_find_ex(int type, int pbe_nid, int *pcnid, int *pmnid,
9981                       EVP_PBE_KEYGEN **pkeygen, EVP_PBE_KEYGEN_EX **pkeygen_ex);
9982   void EVP_PBE_cleanup(void);
9983   int EVP_PBE_get(int *ptype, int *ppbe_nid, size_t num);
9984   # 1569 "include/openssl/evp.h"
9985   int EVP_PKEY_asn1_get_count(void);
9986   const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx);
9987   const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type);
9988   const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe,
9989                                                      const char *str, int len);
9990   int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth);
9991   int EVP_PKEY_asn1_add_alias(int to, int from);
9992   int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id,
9993                               int *ppkey_flags, const char **pinfo,
9994                               const char **ppem_str,
9995                               const EVP_PKEY_ASN1_METHOD *ameth);
9996   
9997   const EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(const EVP_PKEY *pkey);
9998   EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_new(int id, int flags,
9999                                           const char *pem_str,
10000                                           const char *info);
10001   void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst,
10002                           const EVP_PKEY_ASN1_METHOD *src);
10003   void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth);
10004   void EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth,
10005                                 int (*pub_decode) (EVP_PKEY *pk,
10006                                                    const X509_PUBKEY *pub),
10007                                 int (*pub_encode) (X509_PUBKEY *pub,
10008                                                    const EVP_PKEY *pk),
10009                                 int (*pub_cmp) (const EVP_PKEY *a,
10010                                                 const EVP_PKEY *b),
10011                                 int (*pub_print) (BIO *out,
10012                                                   const EVP_PKEY *pkey,
10013                                                   int indent, ASN1_PCTX *pctx),
10014                                 int (*pkey_size) (const EVP_PKEY *pk),
10015                                 int (*pkey_bits) (const EVP_PKEY *pk));
10016   void EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth,
10017                                  int (*priv_decode) (EVP_PKEY *pk,
10018                                                      const PKCS8_PRIV_KEY_INFO
10019                                                      *p8inf),
10020                                  int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8,
10021                                                      const EVP_PKEY *pk),
10022                                  int (*priv_print) (BIO *out,
10023                                                     const EVP_PKEY *pkey,
10024                                                     int indent,
10025                                                     ASN1_PCTX *pctx));
10026   void EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth,
10027                                int (*param_decode) (EVP_PKEY *pkey,
10028                                                     const unsigned char **pder,
10029                                                     int derlen),
10030                                int (*param_encode) (const EVP_PKEY *pkey,
10031                                                     unsigned char **pder),
10032                                int (*param_missing) (const EVP_PKEY *pk),
10033                                int (*param_copy) (EVP_PKEY *to,
10034                                                   const EVP_PKEY *from),
10035                                int (*param_cmp) (const EVP_PKEY *a,
10036                                                  const EVP_PKEY *b),
10037                                int (*param_print) (BIO *out,
10038                                                    const EVP_PKEY *pkey,
10039                                                    int indent,
10040                                                    ASN1_PCTX *pctx));
10041   
10042   void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth,
10043                               void (*pkey_free) (EVP_PKEY *pkey));
10044   void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth,
10045                               int (*pkey_ctrl) (EVP_PKEY *pkey, int op,
10046                                                 long arg1, void *arg2));
10047   void EVP_PKEY_asn1_set_item(EVP_PKEY_ASN1_METHOD *ameth,
10048                               int (*item_verify) (EVP_MD_CTX *ctx,
10049                                                   const ASN1_ITEM *it,
10050                                                   const void *data,
10051                                                   const X509_ALGOR *a,
10052                                                   const ASN1_BIT_STRING *sig,
10053                                                   EVP_PKEY *pkey),
10054                               int (*item_sign) (EVP_MD_CTX *ctx,
10055                                                 const ASN1_ITEM *it,
10056                                                 const void *data,
10057                                                 X509_ALGOR *alg1,
10058                                                 X509_ALGOR *alg2,
10059                                                 ASN1_BIT_STRING *sig));
10060   
10061   void EVP_PKEY_asn1_set_siginf(EVP_PKEY_ASN1_METHOD *ameth,
10062                                 int (*siginf_set) (X509_SIG_INFO *siginf,
10063                                                    const X509_ALGOR *alg,
10064                                                    const ASN1_STRING *sig));
10065   
10066   void EVP_PKEY_asn1_set_check(EVP_PKEY_ASN1_METHOD *ameth,
10067                                int (*pkey_check) (const EVP_PKEY *pk));
10068   
10069   void EVP_PKEY_asn1_set_public_check(EVP_PKEY_ASN1_METHOD *ameth,
10070                                       int (*pkey_pub_check) (const EVP_PKEY *pk));
10071   
10072   void EVP_PKEY_asn1_set_param_check(EVP_PKEY_ASN1_METHOD *ameth,
10073                                      int (*pkey_param_check) (const EVP_PKEY *pk));
10074   
10075   void EVP_PKEY_asn1_set_set_priv_key(EVP_PKEY_ASN1_METHOD *ameth,
10076                                       int (*set_priv_key) (EVP_PKEY *pk,
10077                                                            const unsigned char
10078                                                               *priv,
10079                                                            size_t len));
10080   void EVP_PKEY_asn1_set_set_pub_key(EVP_PKEY_ASN1_METHOD *ameth,
10081                                      int (*set_pub_key) (EVP_PKEY *pk,
10082                                                          const unsigned char *pub,
10083                                                          size_t len));
10084   void EVP_PKEY_asn1_set_get_priv_key(EVP_PKEY_ASN1_METHOD *ameth,
10085                                       int (*get_priv_key) (const EVP_PKEY *pk,
10086                                                            unsigned char *priv,
10087                                                            size_t *len));
10088   void EVP_PKEY_asn1_set_get_pub_key(EVP_PKEY_ASN1_METHOD *ameth,
10089                                      int (*get_pub_key) (const EVP_PKEY *pk,
10090                                                          unsigned char *pub,
10091                                                          size_t *len));
10092   
10093   void EVP_PKEY_asn1_set_security_bits(EVP_PKEY_ASN1_METHOD *ameth,
10094                                        int (*pkey_security_bits) (const EVP_PKEY
10095                                                                   *pk));
10096   
10097   int EVP_PKEY_CTX_get_signature_md(EVP_PKEY_CTX *ctx, const EVP_MD **md);
10098   int EVP_PKEY_CTX_set_signature_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
10099   
10100   int EVP_PKEY_CTX_set1_id(EVP_PKEY_CTX *ctx, const void *id, int len);
10101   int EVP_PKEY_CTX_get1_id(EVP_PKEY_CTX *ctx, void *id);
10102   int EVP_PKEY_CTX_get1_id_len(EVP_PKEY_CTX *ctx, size_t *id_len);
10103   
10104   int EVP_PKEY_CTX_set_kem_op(EVP_PKEY_CTX *ctx, const char *op);
10105   
10106   const char *EVP_PKEY_get0_type_name(const EVP_PKEY *key);
10107   # 1721 "include/openssl/evp.h"
10108   int EVP_PKEY_CTX_set_mac_key(EVP_PKEY_CTX *ctx, const unsigned char *key,
10109                                int keylen);
10110   # 1753 "include/openssl/evp.h"
10111   __attribute__((deprecated("Since OpenSSL " "3.0"))) const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type);
10112   __attribute__((deprecated("Since OpenSSL " "3.0"))) EVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags);
10113   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags,
10114                                                 const EVP_PKEY_METHOD *meth);
10115   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst,
10116                                            const EVP_PKEY_METHOD *src);
10117   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth);
10118   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth);
10119   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EVP_PKEY_meth_remove(const EVP_PKEY_METHOD *pmeth);
10120   __attribute__((deprecated("Since OpenSSL " "3.0"))) size_t EVP_PKEY_meth_get_count(void);
10121   __attribute__((deprecated("Since OpenSSL " "3.0"))) const EVP_PKEY_METHOD *EVP_PKEY_meth_get0(size_t idx);
10122   
10123   
10124   EVP_KEYMGMT *EVP_KEYMGMT_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
10125                                  const char *properties);
10126   int EVP_KEYMGMT_up_ref(EVP_KEYMGMT *keymgmt);
10127   void EVP_KEYMGMT_free(EVP_KEYMGMT *keymgmt);
10128   const OSSL_PROVIDER *EVP_KEYMGMT_get0_provider(const EVP_KEYMGMT *keymgmt);
10129   const char *EVP_KEYMGMT_get0_name(const EVP_KEYMGMT *keymgmt);
10130   const char *EVP_KEYMGMT_get0_description(const EVP_KEYMGMT *keymgmt);
10131   int EVP_KEYMGMT_is_a(const EVP_KEYMGMT *keymgmt, const char *name);
10132   void EVP_KEYMGMT_do_all_provided(OSSL_LIB_CTX *libctx,
10133                                    void (*fn)(EVP_KEYMGMT *keymgmt, void *arg),
10134                                    void *arg);
10135   int EVP_KEYMGMT_names_do_all(const EVP_KEYMGMT *keymgmt,
10136                                void (*fn)(const char *name, void *data),
10137                                void *data);
10138   const OSSL_PARAM *EVP_KEYMGMT_gettable_params(const EVP_KEYMGMT *keymgmt);
10139   const OSSL_PARAM *EVP_KEYMGMT_settable_params(const EVP_KEYMGMT *keymgmt);
10140   const OSSL_PARAM *EVP_KEYMGMT_gen_settable_params(const EVP_KEYMGMT *keymgmt);
10141   
10142   EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
10143   EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e);
10144   EVP_PKEY_CTX *EVP_PKEY_CTX_new_from_name(OSSL_LIB_CTX *libctx,
10145                                            const char *name,
10146                                            const char *propquery);
10147   EVP_PKEY_CTX *EVP_PKEY_CTX_new_from_pkey(OSSL_LIB_CTX *libctx,
10148                                            EVP_PKEY *pkey, const char *propquery);
10149   EVP_PKEY_CTX *EVP_PKEY_CTX_dup(const EVP_PKEY_CTX *ctx);
10150   void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
10151   int EVP_PKEY_CTX_is_a(EVP_PKEY_CTX *ctx, const char *keytype);
10152   
10153   int EVP_PKEY_CTX_get_params(EVP_PKEY_CTX *ctx, OSSL_PARAM *params);
10154   const OSSL_PARAM *EVP_PKEY_CTX_gettable_params(const EVP_PKEY_CTX *ctx);
10155   int EVP_PKEY_CTX_set_params(EVP_PKEY_CTX *ctx, const OSSL_PARAM *params);
10156   const OSSL_PARAM *EVP_PKEY_CTX_settable_params(const EVP_PKEY_CTX *ctx);
10157   int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype,
10158                         int cmd, int p1, void *p2);
10159   int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type,
10160                             const char *value);
10161   int EVP_PKEY_CTX_ctrl_uint64(EVP_PKEY_CTX *ctx, int keytype, int optype,
10162                                int cmd, uint64_t value);
10163   
10164   int EVP_PKEY_CTX_str2ctrl(EVP_PKEY_CTX *ctx, int cmd, const char *str);
10165   int EVP_PKEY_CTX_hex2ctrl(EVP_PKEY_CTX *ctx, int cmd, const char *hex);
10166   
10167   int EVP_PKEY_CTX_md(EVP_PKEY_CTX *ctx, int optype, int cmd, const char *md);
10168   
10169   int EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx);
10170   void EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen);
10171   
10172   EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e,
10173                                  const unsigned char *key, int keylen);
10174   EVP_PKEY *EVP_PKEY_new_raw_private_key_ex(OSSL_LIB_CTX *libctx,
10175                                             const char *keytype,
10176                                             const char *propq,
10177                                             const unsigned char *priv, size_t len);
10178   EVP_PKEY *EVP_PKEY_new_raw_private_key(int type, ENGINE *e,
10179                                          const unsigned char *priv,
10180                                          size_t len);
10181   EVP_PKEY *EVP_PKEY_new_raw_public_key_ex(OSSL_LIB_CTX *libctx,
10182                                            const char *keytype, const char *propq,
10183                                            const unsigned char *pub, size_t len);
10184   EVP_PKEY *EVP_PKEY_new_raw_public_key(int type, ENGINE *e,
10185                                         const unsigned char *pub,
10186                                         size_t len);
10187   int EVP_PKEY_get_raw_private_key(const EVP_PKEY *pkey, unsigned char *priv,
10188                                    size_t *len);
10189   int EVP_PKEY_get_raw_public_key(const EVP_PKEY *pkey, unsigned char *pub,
10190                                   size_t *len);
10191   
10192   
10193   __attribute__((deprecated("Since OpenSSL " "3.0")))
10194   EVP_PKEY *EVP_PKEY_new_CMAC_key(ENGINE *e, const unsigned char *priv,
10195                                   size_t len, const EVP_CIPHER *cipher);
10196   
10197   
10198   void EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data);
10199   void *EVP_PKEY_CTX_get_data(const EVP_PKEY_CTX *ctx);
10200   EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx);
10201   
10202   EVP_PKEY *EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx);
10203   
10204   void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data);
10205   void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx);
10206   
10207   void EVP_SIGNATURE_free(EVP_SIGNATURE *signature);
10208   int EVP_SIGNATURE_up_ref(EVP_SIGNATURE *signature);
10209   OSSL_PROVIDER *EVP_SIGNATURE_get0_provider(const EVP_SIGNATURE *signature);
10210   EVP_SIGNATURE *EVP_SIGNATURE_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
10211                                      const char *properties);
10212   int EVP_SIGNATURE_is_a(const EVP_SIGNATURE *signature, const char *name);
10213   const char *EVP_SIGNATURE_get0_name(const EVP_SIGNATURE *signature);
10214   const char *EVP_SIGNATURE_get0_description(const EVP_SIGNATURE *signature);
10215   void EVP_SIGNATURE_do_all_provided(OSSL_LIB_CTX *libctx,
10216                                      void (*fn)(EVP_SIGNATURE *signature,
10217                                                 void *data),
10218                                      void *data);
10219   int EVP_SIGNATURE_names_do_all(const EVP_SIGNATURE *signature,
10220                                  void (*fn)(const char *name, void *data),
10221                                  void *data);
10222   const OSSL_PARAM *EVP_SIGNATURE_gettable_ctx_params(const EVP_SIGNATURE *sig);
10223   const OSSL_PARAM *EVP_SIGNATURE_settable_ctx_params(const EVP_SIGNATURE *sig);
10224   
10225   void EVP_ASYM_CIPHER_free(EVP_ASYM_CIPHER *cipher);
10226   int EVP_ASYM_CIPHER_up_ref(EVP_ASYM_CIPHER *cipher);
10227   OSSL_PROVIDER *EVP_ASYM_CIPHER_get0_provider(const EVP_ASYM_CIPHER *cipher);
10228   EVP_ASYM_CIPHER *EVP_ASYM_CIPHER_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
10229                                          const char *properties);
10230   int EVP_ASYM_CIPHER_is_a(const EVP_ASYM_CIPHER *cipher, const char *name);
10231   const char *EVP_ASYM_CIPHER_get0_name(const EVP_ASYM_CIPHER *cipher);
10232   const char *EVP_ASYM_CIPHER_get0_description(const EVP_ASYM_CIPHER *cipher);
10233   void EVP_ASYM_CIPHER_do_all_provided(OSSL_LIB_CTX *libctx,
10234                                        void (*fn)(EVP_ASYM_CIPHER *cipher,
10235                                                   void *arg),
10236                                        void *arg);
10237   int EVP_ASYM_CIPHER_names_do_all(const EVP_ASYM_CIPHER *cipher,
10238                                    void (*fn)(const char *name, void *data),
10239                                    void *data);
10240   const OSSL_PARAM *EVP_ASYM_CIPHER_gettable_ctx_params(const EVP_ASYM_CIPHER *ciph);
10241   const OSSL_PARAM *EVP_ASYM_CIPHER_settable_ctx_params(const EVP_ASYM_CIPHER *ciph);
10242   
10243   void EVP_KEM_free(EVP_KEM *wrap);
10244   int EVP_KEM_up_ref(EVP_KEM *wrap);
10245   OSSL_PROVIDER *EVP_KEM_get0_provider(const EVP_KEM *wrap);
10246   EVP_KEM *EVP_KEM_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
10247                          const char *properties);
10248   int EVP_KEM_is_a(const EVP_KEM *wrap, const char *name);
10249   const char *EVP_KEM_get0_name(const EVP_KEM *wrap);
10250   const char *EVP_KEM_get0_description(const EVP_KEM *wrap);
10251   void EVP_KEM_do_all_provided(OSSL_LIB_CTX *libctx,
10252                                void (*fn)(EVP_KEM *wrap, void *arg), void *arg);
10253   int EVP_KEM_names_do_all(const EVP_KEM *wrap,
10254                            void (*fn)(const char *name, void *data), void *data);
10255   const OSSL_PARAM *EVP_KEM_gettable_ctx_params(const EVP_KEM *kem);
10256   const OSSL_PARAM *EVP_KEM_settable_ctx_params(const EVP_KEM *kem);
10257   
10258   int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx);
10259   int EVP_PKEY_sign_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);
10260   int EVP_PKEY_sign(EVP_PKEY_CTX *ctx,
10261                     unsigned char *sig, size_t *siglen,
10262                     const unsigned char *tbs, size_t tbslen);
10263   int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx);
10264   int EVP_PKEY_verify_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);
10265   int EVP_PKEY_verify(EVP_PKEY_CTX *ctx,
10266                       const unsigned char *sig, size_t siglen,
10267                       const unsigned char *tbs, size_t tbslen);
10268   int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx);
10269   int EVP_PKEY_verify_recover_init_ex(EVP_PKEY_CTX *ctx,
10270                                       const OSSL_PARAM params[]);
10271   int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,
10272                               unsigned char *rout, size_t *routlen,
10273                               const unsigned char *sig, size_t siglen);
10274   int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx);
10275   int EVP_PKEY_encrypt_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);
10276   int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx,
10277                        unsigned char *out, size_t *outlen,
10278                        const unsigned char *in, size_t inlen);
10279   int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx);
10280   int EVP_PKEY_decrypt_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);
10281   int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,
10282                        unsigned char *out, size_t *outlen,
10283                        const unsigned char *in, size_t inlen);
10284   
10285   int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx);
10286   int EVP_PKEY_derive_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);
10287   int EVP_PKEY_derive_set_peer_ex(EVP_PKEY_CTX *ctx, EVP_PKEY *peer,
10288                                   int validate_peer);
10289   int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer);
10290   int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen);
10291   
10292   int EVP_PKEY_encapsulate_init(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);
10293   int EVP_PKEY_auth_encapsulate_init(EVP_PKEY_CTX *ctx, EVP_PKEY *authpriv,
10294                                      const OSSL_PARAM params[]);
10295   int EVP_PKEY_encapsulate(EVP_PKEY_CTX *ctx,
10296                            unsigned char *wrappedkey, size_t *wrappedkeylen,
10297                            unsigned char *genkey, size_t *genkeylen);
10298   int EVP_PKEY_decapsulate_init(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);
10299   int EVP_PKEY_auth_decapsulate_init(EVP_PKEY_CTX *ctx, EVP_PKEY *authpub,
10300                                      const OSSL_PARAM params[]);
10301   int EVP_PKEY_decapsulate(EVP_PKEY_CTX *ctx,
10302                            unsigned char *unwrapped, size_t *unwrappedlen,
10303                            const unsigned char *wrapped, size_t wrappedlen);
10304   typedef int EVP_PKEY_gen_cb(EVP_PKEY_CTX *ctx);
10305   
10306   int EVP_PKEY_fromdata_init(EVP_PKEY_CTX *ctx);
10307   int EVP_PKEY_fromdata(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey, int selection,
10308                         OSSL_PARAM param[]);
10309   const OSSL_PARAM *EVP_PKEY_fromdata_settable(EVP_PKEY_CTX *ctx, int selection);
10310   
10311   int EVP_PKEY_todata(const EVP_PKEY *pkey, int selection, OSSL_PARAM **params);
10312   int EVP_PKEY_export(const EVP_PKEY *pkey, int selection,
10313                       OSSL_CALLBACK *export_cb, void *export_cbarg);
10314   
10315   const OSSL_PARAM *EVP_PKEY_gettable_params(const EVP_PKEY *pkey);
10316   int EVP_PKEY_get_params(const EVP_PKEY *pkey, OSSL_PARAM params[]);
10317   int EVP_PKEY_get_int_param(const EVP_PKEY *pkey, const char *key_name,
10318                              int *out);
10319   int EVP_PKEY_get_size_t_param(const EVP_PKEY *pkey, const char *key_name,
10320                                 size_t *out);
10321   int EVP_PKEY_get_bn_param(const EVP_PKEY *pkey, const char *key_name,
10322                             BIGNUM **bn);
10323   int EVP_PKEY_get_utf8_string_param(const EVP_PKEY *pkey, const char *key_name,
10324                                       char *str, size_t max_buf_sz, size_t *out_sz);
10325   int EVP_PKEY_get_octet_string_param(const EVP_PKEY *pkey, const char *key_name,
10326                                       unsigned char *buf, size_t max_buf_sz,
10327                                       size_t *out_sz);
10328   
10329   const OSSL_PARAM *EVP_PKEY_settable_params(const EVP_PKEY *pkey);
10330   int EVP_PKEY_set_params(EVP_PKEY *pkey, OSSL_PARAM params[]);
10331   int EVP_PKEY_set_int_param(EVP_PKEY *pkey, const char *key_name, int in);
10332   int EVP_PKEY_set_size_t_param(EVP_PKEY *pkey, const char *key_name, size_t in);
10333   int EVP_PKEY_set_bn_param(EVP_PKEY *pkey, const char *key_name,
10334                             const BIGNUM *bn);
10335   int EVP_PKEY_set_utf8_string_param(EVP_PKEY *pkey, const char *key_name,
10336                                      const char *str);
10337   int EVP_PKEY_set_octet_string_param(EVP_PKEY *pkey, const char *key_name,
10338                                       const unsigned char *buf, size_t bsize);
10339   
10340   int EVP_PKEY_get_ec_point_conv_form(const EVP_PKEY *pkey);
10341   int EVP_PKEY_get_field_type(const EVP_PKEY *pkey);
10342   
10343   EVP_PKEY *EVP_PKEY_Q_keygen(OSSL_LIB_CTX *libctx, const char *propq,
10344                               const char *type, ...);
10345   int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx);
10346   int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
10347   int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx);
10348   int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
10349   int EVP_PKEY_generate(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
10350   int EVP_PKEY_check(EVP_PKEY_CTX *ctx);
10351   int EVP_PKEY_public_check(EVP_PKEY_CTX *ctx);
10352   int EVP_PKEY_public_check_quick(EVP_PKEY_CTX *ctx);
10353   int EVP_PKEY_param_check(EVP_PKEY_CTX *ctx);
10354   int EVP_PKEY_param_check_quick(EVP_PKEY_CTX *ctx);
10355   int EVP_PKEY_private_check(EVP_PKEY_CTX *ctx);
10356   int EVP_PKEY_pairwise_check(EVP_PKEY_CTX *ctx);
10357   
10358   
10359   
10360   int EVP_PKEY_set_ex_data(EVP_PKEY *key, int idx, void *arg);
10361   void *EVP_PKEY_get_ex_data(const EVP_PKEY *key, int idx);
10362   
10363   void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb);
10364   EVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx);
10365   
10366   int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx);
10367   
10368   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth,
10369                                                int (*init) (EVP_PKEY_CTX *ctx));
10370   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_copy
10371       (EVP_PKEY_METHOD *pmeth, int (*copy) (EVP_PKEY_CTX *dst,
10372                                             const EVP_PKEY_CTX *src));
10373   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_cleanup
10374       (EVP_PKEY_METHOD *pmeth, void (*cleanup) (EVP_PKEY_CTX *ctx));
10375   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_paramgen
10376       (EVP_PKEY_METHOD *pmeth, int (*paramgen_init) (EVP_PKEY_CTX *ctx),
10377        int (*paramgen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey));
10378   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_keygen
10379       (EVP_PKEY_METHOD *pmeth, int (*keygen_init) (EVP_PKEY_CTX *ctx),
10380        int (*keygen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey));
10381   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_sign
10382       (EVP_PKEY_METHOD *pmeth, int (*sign_init) (EVP_PKEY_CTX *ctx),
10383        int (*sign) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
10384                     const unsigned char *tbs, size_t tbslen));
10385   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_verify
10386       (EVP_PKEY_METHOD *pmeth, int (*verify_init) (EVP_PKEY_CTX *ctx),
10387        int (*verify) (EVP_PKEY_CTX *ctx, const unsigned char *sig, size_t siglen,
10388                       const unsigned char *tbs, size_t tbslen));
10389   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_verify_recover
10390       (EVP_PKEY_METHOD *pmeth, int (*verify_recover_init) (EVP_PKEY_CTX *ctx),
10391        int (*verify_recover) (EVP_PKEY_CTX *ctx, unsigned char *sig,
10392                               size_t *siglen, const unsigned char *tbs,
10393                               size_t tbslen));
10394   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_signctx
10395       (EVP_PKEY_METHOD *pmeth, int (*signctx_init) (EVP_PKEY_CTX *ctx,
10396                                                     EVP_MD_CTX *mctx),
10397        int (*signctx) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
10398                        EVP_MD_CTX *mctx));
10399   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_verifyctx
10400       (EVP_PKEY_METHOD *pmeth, int (*verifyctx_init) (EVP_PKEY_CTX *ctx,
10401                                                       EVP_MD_CTX *mctx),
10402        int (*verifyctx) (EVP_PKEY_CTX *ctx, const unsigned char *sig, int siglen,
10403                          EVP_MD_CTX *mctx));
10404   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_encrypt
10405       (EVP_PKEY_METHOD *pmeth, int (*encrypt_init) (EVP_PKEY_CTX *ctx),
10406        int (*encryptfn) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
10407                          const unsigned char *in, size_t inlen));
10408   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_decrypt
10409       (EVP_PKEY_METHOD *pmeth, int (*decrypt_init) (EVP_PKEY_CTX *ctx),
10410        int (*decrypt) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
10411                        const unsigned char *in, size_t inlen));
10412   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_derive
10413       (EVP_PKEY_METHOD *pmeth, int (*derive_init) (EVP_PKEY_CTX *ctx),
10414        int (*derive) (EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen));
10415   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_ctrl
10416       (EVP_PKEY_METHOD *pmeth, int (*ctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
10417                                             void *p2),
10418        int (*ctrl_str) (EVP_PKEY_CTX *ctx, const char *type, const char *value));
10419   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_digestsign
10420       (EVP_PKEY_METHOD *pmeth,
10421        int (*digestsign) (EVP_MD_CTX *ctx, unsigned char *sig, size_t *siglen,
10422                           const unsigned char *tbs, size_t tbslen));
10423   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_digestverify
10424       (EVP_PKEY_METHOD *pmeth,
10425        int (*digestverify) (EVP_MD_CTX *ctx, const unsigned char *sig,
10426                             size_t siglen, const unsigned char *tbs,
10427                             size_t tbslen));
10428   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_check
10429       (EVP_PKEY_METHOD *pmeth, int (*check) (EVP_PKEY *pkey));
10430   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_public_check
10431       (EVP_PKEY_METHOD *pmeth, int (*check) (EVP_PKEY *pkey));
10432   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_param_check
10433       (EVP_PKEY_METHOD *pmeth, int (*check) (EVP_PKEY *pkey));
10434   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_set_digest_custom
10435       (EVP_PKEY_METHOD *pmeth, int (*digest_custom) (EVP_PKEY_CTX *ctx,
10436                                                      EVP_MD_CTX *mctx));
10437   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_init
10438       (const EVP_PKEY_METHOD *pmeth, int (**pinit) (EVP_PKEY_CTX *ctx));
10439   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_copy
10440       (const EVP_PKEY_METHOD *pmeth, int (**pcopy) (EVP_PKEY_CTX *dst,
10441                                                     const EVP_PKEY_CTX *src));
10442   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_cleanup
10443       (const EVP_PKEY_METHOD *pmeth, void (**pcleanup) (EVP_PKEY_CTX *ctx));
10444   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_paramgen
10445       (const EVP_PKEY_METHOD *pmeth, int (**pparamgen_init) (EVP_PKEY_CTX *ctx),
10446        int (**pparamgen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey));
10447   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_keygen
10448       (const EVP_PKEY_METHOD *pmeth, int (**pkeygen_init) (EVP_PKEY_CTX *ctx),
10449        int (**pkeygen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey));
10450   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_sign
10451       (const EVP_PKEY_METHOD *pmeth, int (**psign_init) (EVP_PKEY_CTX *ctx),
10452        int (**psign) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
10453                       const unsigned char *tbs, size_t tbslen));
10454   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_verify
10455       (const EVP_PKEY_METHOD *pmeth, int (**pverify_init) (EVP_PKEY_CTX *ctx),
10456        int (**pverify) (EVP_PKEY_CTX *ctx, const unsigned char *sig,
10457                         size_t siglen, const unsigned char *tbs, size_t tbslen));
10458   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_verify_recover
10459       (const EVP_PKEY_METHOD *pmeth,
10460        int (**pverify_recover_init) (EVP_PKEY_CTX *ctx),
10461        int (**pverify_recover) (EVP_PKEY_CTX *ctx, unsigned char *sig,
10462                                 size_t *siglen, const unsigned char *tbs,
10463                                 size_t tbslen));
10464   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_signctx
10465       (const EVP_PKEY_METHOD *pmeth,
10466        int (**psignctx_init) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx),
10467        int (**psignctx) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
10468                          EVP_MD_CTX *mctx));
10469   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_verifyctx
10470       (const EVP_PKEY_METHOD *pmeth,
10471        int (**pverifyctx_init) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx),
10472        int (**pverifyctx) (EVP_PKEY_CTX *ctx, const unsigned char *sig,
10473                             int siglen, EVP_MD_CTX *mctx));
10474   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_encrypt
10475       (const EVP_PKEY_METHOD *pmeth, int (**pencrypt_init) (EVP_PKEY_CTX *ctx),
10476        int (**pencryptfn) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
10477                            const unsigned char *in, size_t inlen));
10478   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_decrypt
10479       (const EVP_PKEY_METHOD *pmeth, int (**pdecrypt_init) (EVP_PKEY_CTX *ctx),
10480        int (**pdecrypt) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
10481                          const unsigned char *in, size_t inlen));
10482   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_derive
10483       (const EVP_PKEY_METHOD *pmeth, int (**pderive_init) (EVP_PKEY_CTX *ctx),
10484        int (**pderive) (EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen));
10485   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_ctrl
10486       (const EVP_PKEY_METHOD *pmeth,
10487        int (**pctrl) (EVP_PKEY_CTX *ctx, int type, int p1, void *p2),
10488        int (**pctrl_str) (EVP_PKEY_CTX *ctx, const char *type,
10489                           const char *value));
10490   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_digestsign
10491       (const EVP_PKEY_METHOD *pmeth,
10492        int (**digestsign) (EVP_MD_CTX *ctx, unsigned char *sig, size_t *siglen,
10493                            const unsigned char *tbs, size_t tbslen));
10494   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_digestverify
10495       (const EVP_PKEY_METHOD *pmeth,
10496        int (**digestverify) (EVP_MD_CTX *ctx, const unsigned char *sig,
10497                              size_t siglen, const unsigned char *tbs,
10498                              size_t tbslen));
10499   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_check
10500       (const EVP_PKEY_METHOD *pmeth, int (**pcheck) (EVP_PKEY *pkey));
10501   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_public_check
10502       (const EVP_PKEY_METHOD *pmeth, int (**pcheck) (EVP_PKEY *pkey));
10503   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_param_check
10504       (const EVP_PKEY_METHOD *pmeth, int (**pcheck) (EVP_PKEY *pkey));
10505   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EVP_PKEY_meth_get_digest_custom
10506       (const EVP_PKEY_METHOD *pmeth,
10507        int (**pdigest_custom) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx));
10508   
10509   
10510   void EVP_KEYEXCH_free(EVP_KEYEXCH *exchange);
10511   int EVP_KEYEXCH_up_ref(EVP_KEYEXCH *exchange);
10512   EVP_KEYEXCH *EVP_KEYEXCH_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
10513                                  const char *properties);
10514   OSSL_PROVIDER *EVP_KEYEXCH_get0_provider(const EVP_KEYEXCH *exchange);
10515   int EVP_KEYEXCH_is_a(const EVP_KEYEXCH *keyexch, const char *name);
10516   const char *EVP_KEYEXCH_get0_name(const EVP_KEYEXCH *keyexch);
10517   const char *EVP_KEYEXCH_get0_description(const EVP_KEYEXCH *keyexch);
10518   void EVP_KEYEXCH_do_all_provided(OSSL_LIB_CTX *libctx,
10519                                    void (*fn)(EVP_KEYEXCH *keyexch, void *data),
10520                                    void *data);
10521   int EVP_KEYEXCH_names_do_all(const EVP_KEYEXCH *keyexch,
10522                                void (*fn)(const char *name, void *data),
10523                                void *data);
10524   const OSSL_PARAM *EVP_KEYEXCH_gettable_ctx_params(const EVP_KEYEXCH *keyexch);
10525   const OSSL_PARAM *EVP_KEYEXCH_settable_ctx_params(const EVP_KEYEXCH *keyexch);
10526   
10527   void EVP_add_alg_module(void);
10528   
10529   int EVP_PKEY_CTX_set_group_name(EVP_PKEY_CTX *ctx, const char *name);
10530   int EVP_PKEY_CTX_get_group_name(EVP_PKEY_CTX *ctx, char *name, size_t namelen);
10531   int EVP_PKEY_get_group_name(const EVP_PKEY *pkey, char *name, size_t name_sz,
10532                               size_t *gname_len);
10533   
10534   OSSL_LIB_CTX *EVP_PKEY_CTX_get0_libctx(EVP_PKEY_CTX *ctx);
10535   const char *EVP_PKEY_CTX_get0_propq(const EVP_PKEY_CTX *ctx);
10536   const OSSL_PROVIDER *EVP_PKEY_CTX_get0_provider(const EVP_PKEY_CTX *ctx);
10537   # 30 "include/openssl/x509.h" 2
10538   
10539   
10540   
10541   # 1 "include/openssl/ec.h" 1
10542   # 13 "include/openssl/ec.h"
10543           
10544   
10545   
10546   
10547   
10548   
10549   
10550   
10551   # 1 "include/openssl/types.h" 1
10552   # 22 "include/openssl/ec.h" 2
10553   # 33 "include/openssl/ec.h"
10554   int EVP_PKEY_CTX_set_ec_paramgen_curve_nid(EVP_PKEY_CTX *ctx, int nid);
10555   int EVP_PKEY_CTX_set_ec_param_enc(EVP_PKEY_CTX *ctx, int param_enc);
10556   int EVP_PKEY_CTX_set_ecdh_cofactor_mode(EVP_PKEY_CTX *ctx, int cofactor_mode);
10557   int EVP_PKEY_CTX_get_ecdh_cofactor_mode(EVP_PKEY_CTX *ctx);
10558   
10559   int EVP_PKEY_CTX_set_ecdh_kdf_type(EVP_PKEY_CTX *ctx, int kdf);
10560   int EVP_PKEY_CTX_get_ecdh_kdf_type(EVP_PKEY_CTX *ctx);
10561   
10562   int EVP_PKEY_CTX_set_ecdh_kdf_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
10563   int EVP_PKEY_CTX_get_ecdh_kdf_md(EVP_PKEY_CTX *ctx, const EVP_MD **md);
10564   
10565   int EVP_PKEY_CTX_set_ecdh_kdf_outlen(EVP_PKEY_CTX *ctx, int len);
10566   int EVP_PKEY_CTX_get_ecdh_kdf_outlen(EVP_PKEY_CTX *ctx, int *len);
10567   
10568   int EVP_PKEY_CTX_set0_ecdh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char *ukm,
10569                                      int len);
10570   
10571   __attribute__((deprecated("Since OpenSSL " "3.0")))
10572   int EVP_PKEY_CTX_get0_ecdh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char **ukm);
10573   # 78 "include/openssl/ec.h"
10574   typedef enum {
10575   
10576   
10577       POINT_CONVERSION_COMPRESSED = 2,
10578   
10579       POINT_CONVERSION_UNCOMPRESSED = 4,
10580   
10581   
10582       POINT_CONVERSION_HYBRID = 6
10583   } point_conversion_form_t;
10584   
10585   const char *OSSL_EC_curve_nid2name(int nid);
10586   # 100 "include/openssl/ec.h"
10587   # 1 "include/openssl/ecerr.h" 1
10588   # 13 "include/openssl/ecerr.h"
10589           
10590   # 101 "include/openssl/ec.h" 2
10591   
10592   
10593   
10594   
10595   
10596   
10597   
10598   typedef struct ec_method_st EC_METHOD;
10599   
10600   typedef struct ec_group_st EC_GROUP;
10601   typedef struct ec_point_st EC_POINT;
10602   typedef struct ecpk_parameters_st ECPKPARAMETERS;
10603   typedef struct ec_parameters_st ECPARAMETERS;
10604   # 124 "include/openssl/ec.h"
10605   __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_METHOD *EC_GFp_simple_method(void);
10606   
10607   
10608   
10609   
10610   __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_METHOD *EC_GFp_mont_method(void);
10611   
10612   
10613   
10614   
10615   __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_METHOD *EC_GFp_nist_method(void);
10616   # 161 "include/openssl/ec.h"
10617   __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_METHOD *EC_GF2m_simple_method(void);
10618   # 174 "include/openssl/ec.h"
10619   __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_GROUP *EC_GROUP_new(const EC_METHOD *meth);
10620   
10621   
10622   
10623   
10624   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_GROUP_clear_free(EC_GROUP *group);
10625   
10626   
10627   
10628   
10629   
10630   __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group);
10631   
10632   
10633   
10634   
10635   
10636   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_METHOD_get_field_type(const EC_METHOD *meth);
10637   
10638   
10639   
10640   
10641   
10642   void EC_GROUP_free(EC_GROUP *group);
10643   
10644   
10645   
10646   
10647   
10648   
10649   int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src);
10650   
10651   
10652   
10653   
10654   
10655   
10656   EC_GROUP *EC_GROUP_dup(const EC_GROUP *src);
10657   # 221 "include/openssl/ec.h"
10658   int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
10659                              const BIGNUM *order, const BIGNUM *cofactor);
10660   
10661   
10662   
10663   
10664   
10665   const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group);
10666   
10667   
10668   
10669   
10670   
10671   BN_MONT_CTX *EC_GROUP_get_mont_data(const EC_GROUP *group);
10672   
10673   
10674   
10675   
10676   
10677   
10678   
10679   int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx);
10680   
10681   
10682   
10683   
10684   
10685   const BIGNUM *EC_GROUP_get0_order(const EC_GROUP *group);
10686   
10687   
10688   
10689   
10690   
10691   int EC_GROUP_order_bits(const EC_GROUP *group);
10692   
10693   
10694   
10695   
10696   
10697   
10698   
10699   int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor,
10700                             BN_CTX *ctx);
10701   
10702   
10703   
10704   
10705   
10706   const BIGNUM *EC_GROUP_get0_cofactor(const EC_GROUP *group);
10707   
10708   
10709   
10710   
10711   
10712   void EC_GROUP_set_curve_name(EC_GROUP *group, int nid);
10713   
10714   
10715   
10716   
10717   
10718   int EC_GROUP_get_curve_name(const EC_GROUP *group);
10719   
10720   
10721   
10722   
10723   
10724   const BIGNUM *EC_GROUP_get0_field(const EC_GROUP *group);
10725   
10726   
10727   
10728   
10729   
10730   int EC_GROUP_get_field_type(const EC_GROUP *group);
10731   
10732   void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag);
10733   int EC_GROUP_get_asn1_flag(const EC_GROUP *group);
10734   
10735   void EC_GROUP_set_point_conversion_form(EC_GROUP *group,
10736                                           point_conversion_form_t form);
10737   point_conversion_form_t EC_GROUP_get_point_conversion_form(const EC_GROUP *);
10738   
10739   unsigned char *EC_GROUP_get0_seed(const EC_GROUP *x);
10740   size_t EC_GROUP_get_seed_len(const EC_GROUP *);
10741   size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len);
10742   # 316 "include/openssl/ec.h"
10743   int EC_GROUP_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
10744                          const BIGNUM *b, BN_CTX *ctx);
10745   # 329 "include/openssl/ec.h"
10746   int EC_GROUP_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b,
10747                          BN_CTX *ctx);
10748   # 342 "include/openssl/ec.h"
10749   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_GROUP_set_curve_GFp(EC_GROUP *group,
10750                                                    const BIGNUM *p,
10751                                                    const BIGNUM *a,
10752                                                    const BIGNUM *b,
10753                                                    BN_CTX *ctx);
10754   # 357 "include/openssl/ec.h"
10755   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_GROUP_get_curve_GFp(const EC_GROUP *group,
10756                                                    BIGNUM *p,
10757                                                    BIGNUM *a, BIGNUM *b,
10758                                                    BN_CTX *ctx);
10759   # 372 "include/openssl/ec.h"
10760   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_GROUP_set_curve_GF2m(EC_GROUP *group,
10761                                                     const BIGNUM *p,
10762                                                     const BIGNUM *a,
10763                                                     const BIGNUM *b,
10764                                                     BN_CTX *ctx);
10765   # 387 "include/openssl/ec.h"
10766   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_GROUP_get_curve_GF2m(const EC_GROUP *group,
10767                                                     BIGNUM *p,
10768                                                     BIGNUM *a, BIGNUM *b,
10769                                                     BN_CTX *ctx);
10770   
10771   
10772   
10773   
10774   
10775   
10776   
10777   int EC_GROUP_get_degree(const EC_GROUP *group);
10778   
10779   
10780   
10781   
10782   
10783   
10784   int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx);
10785   
10786   
10787   
10788   
10789   
10790   
10791   int EC_GROUP_check_discriminant(const EC_GROUP *group, BN_CTX *ctx);
10792   
10793   
10794   
10795   
10796   
10797   
10798   
10799   int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx);
10800   # 435 "include/openssl/ec.h"
10801   EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a,
10802                                    const BIGNUM *b, BN_CTX *ctx);
10803   # 446 "include/openssl/ec.h"
10804   EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a,
10805                                     const BIGNUM *b, BN_CTX *ctx);
10806   # 460 "include/openssl/ec.h"
10807   EC_GROUP *EC_GROUP_new_from_params(const OSSL_PARAM params[],
10808                                      OSSL_LIB_CTX *libctx, const char *propq);
10809   # 476 "include/openssl/ec.h"
10810   OSSL_PARAM *EC_GROUP_to_params(const EC_GROUP *group, OSSL_LIB_CTX *libctx,
10811                                  const char *propq, BN_CTX *bnctx);
10812   # 488 "include/openssl/ec.h"
10813   EC_GROUP *EC_GROUP_new_by_curve_name_ex(OSSL_LIB_CTX *libctx, const char *propq,
10814                                           int nid);
10815   # 499 "include/openssl/ec.h"
10816   EC_GROUP *EC_GROUP_new_by_curve_name(int nid);
10817   
10818   
10819   
10820   
10821   
10822   
10823   EC_GROUP *EC_GROUP_new_from_ecparameters(const ECPARAMETERS *params);
10824   
10825   
10826   
10827   
10828   
10829   
10830   
10831   ECPARAMETERS *EC_GROUP_get_ecparameters(const EC_GROUP *group,
10832                                           ECPARAMETERS *params);
10833   
10834   
10835   
10836   
10837   
10838   
10839   EC_GROUP *EC_GROUP_new_from_ecpkparameters(const ECPKPARAMETERS *params);
10840   
10841   
10842   
10843   
10844   
10845   
10846   
10847   ECPKPARAMETERS *EC_GROUP_get_ecpkparameters(const EC_GROUP *group,
10848                                               ECPKPARAMETERS *params);
10849   
10850   
10851   
10852   
10853   
10854   typedef struct {
10855       int nid;
10856       const char *comment;
10857   } EC_builtin_curve;
10858   
10859   
10860   
10861   
10862   
10863   
10864   
10865   size_t EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems);
10866   
10867   const char *EC_curve_nid2nist(int nid);
10868   int EC_curve_nist2nid(const char *name);
10869   int EC_GROUP_check_named_curve(const EC_GROUP *group, int nist_only,
10870                                  BN_CTX *ctx);
10871   # 563 "include/openssl/ec.h"
10872   EC_POINT *EC_POINT_new(const EC_GROUP *group);
10873   
10874   
10875   
10876   
10877   void EC_POINT_free(EC_POINT *point);
10878   
10879   
10880   
10881   
10882   void EC_POINT_clear_free(EC_POINT *point);
10883   
10884   
10885   
10886   
10887   
10888   
10889   int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src);
10890   
10891   
10892   
10893   
10894   
10895   
10896   
10897   EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group);
10898   
10899   
10900   
10901   
10902   
10903   
10904   int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point);
10905   
10906   
10907   
10908   
10909   
10910   
10911   __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_METHOD *EC_POINT_method_of(const EC_POINT *point);
10912   # 613 "include/openssl/ec.h"
10913   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINT_set_Jprojective_coordinates_GFp
10914                         (const EC_GROUP *group, EC_POINT *p,
10915                          const BIGNUM *x, const BIGNUM *y, const BIGNUM *z,
10916                          BN_CTX *ctx);
10917   # 627 "include/openssl/ec.h"
10918   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINT_get_Jprojective_coordinates_GFp
10919                         (const EC_GROUP *group, const EC_POINT *p,
10920                          BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx);
10921   # 640 "include/openssl/ec.h"
10922   int EC_POINT_set_affine_coordinates(const EC_GROUP *group, EC_POINT *p,
10923                                       const BIGNUM *x, const BIGNUM *y,
10924                                       BN_CTX *ctx);
10925   # 652 "include/openssl/ec.h"
10926   int EC_POINT_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *p,
10927                                       BIGNUM *x, BIGNUM *y, BN_CTX *ctx);
10928   # 665 "include/openssl/ec.h"
10929   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINT_set_affine_coordinates_GFp
10930                         (const EC_GROUP *group, EC_POINT *p,
10931                          const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx);
10932   # 678 "include/openssl/ec.h"
10933   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINT_get_affine_coordinates_GFp
10934                         (const EC_GROUP *group, const EC_POINT *p,
10935                          BIGNUM *x, BIGNUM *y, BN_CTX *ctx);
10936   # 691 "include/openssl/ec.h"
10937   int EC_POINT_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *p,
10938                                           const BIGNUM *x, int y_bit,
10939                                           BN_CTX *ctx);
10940   # 705 "include/openssl/ec.h"
10941   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINT_set_compressed_coordinates_GFp
10942                         (const EC_GROUP *group, EC_POINT *p,
10943                          const BIGNUM *x, int y_bit, BN_CTX *ctx);
10944   # 718 "include/openssl/ec.h"
10945   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINT_set_affine_coordinates_GF2m
10946                         (const EC_GROUP *group, EC_POINT *p,
10947                          const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx);
10948   # 731 "include/openssl/ec.h"
10949   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINT_get_affine_coordinates_GF2m
10950                         (const EC_GROUP *group, const EC_POINT *p,
10951                          BIGNUM *x, BIGNUM *y, BN_CTX *ctx);
10952   # 744 "include/openssl/ec.h"
10953   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINT_set_compressed_coordinates_GF2m
10954                         (const EC_GROUP *group, EC_POINT *p,
10955                          const BIGNUM *x, int y_bit, BN_CTX *ctx);
10956   # 760 "include/openssl/ec.h"
10957   size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p,
10958                             point_conversion_form_t form,
10959                             unsigned char *buf, size_t len, BN_CTX *ctx);
10960   # 772 "include/openssl/ec.h"
10961   int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p,
10962                          const unsigned char *buf, size_t len, BN_CTX *ctx);
10963   # 783 "include/openssl/ec.h"
10964   size_t EC_POINT_point2buf(const EC_GROUP *group, const EC_POINT *point,
10965                             point_conversion_form_t form,
10966                             unsigned char **pbuf, BN_CTX *ctx);
10967   
10968   
10969   
10970   __attribute__((deprecated("Since OpenSSL " "3.0"))) BIGNUM *EC_POINT_point2bn(const EC_GROUP *,
10971                                                   const EC_POINT *,
10972                                                   point_conversion_form_t form,
10973                                                   BIGNUM *, BN_CTX *);
10974   __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_POINT *EC_POINT_bn2point(const EC_GROUP *,
10975                                                     const BIGNUM *,
10976                                                     EC_POINT *, BN_CTX *);
10977   
10978   
10979   char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *,
10980                            point_conversion_form_t form, BN_CTX *);
10981   EC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *,
10982                                EC_POINT *, BN_CTX *);
10983   # 815 "include/openssl/ec.h"
10984   int EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
10985                    const EC_POINT *b, BN_CTX *ctx);
10986   # 825 "include/openssl/ec.h"
10987   int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
10988                    BN_CTX *ctx);
10989   
10990   
10991   
10992   
10993   
10994   
10995   
10996   int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx);
10997   
10998   
10999   
11000   
11001   
11002   
11003   int EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *p);
11004   
11005   
11006   
11007   
11008   
11009   
11010   
11011   int EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point,
11012                            BN_CTX *ctx);
11013   # 859 "include/openssl/ec.h"
11014   int EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b,
11015                    BN_CTX *ctx);
11016   
11017   
11018   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINT_make_affine(const EC_GROUP *group,
11019                                                  EC_POINT *point, BN_CTX *ctx);
11020   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINTs_make_affine(const EC_GROUP *group, size_t num,
11021                                                   EC_POINT *points[], BN_CTX *ctx);
11022   # 878 "include/openssl/ec.h"
11023   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r,
11024                                           const BIGNUM *n, size_t num,
11025                                           const EC_POINT *p[], const BIGNUM *m[],
11026                                           BN_CTX *ctx);
11027   # 893 "include/openssl/ec.h"
11028   int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
11029                    const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx);
11030   
11031   
11032   
11033   
11034   
11035   
11036   
11037   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx);
11038   
11039   
11040   
11041   
11042   
11043   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_GROUP_have_precompute_mult(const EC_GROUP *group);
11044   
11045   
11046   
11047   
11048   
11049   
11050   extern const ASN1_ITEM * ECPKPARAMETERS_it(void);
11051   extern ECPKPARAMETERS *ECPKPARAMETERS_new(void); extern void ECPKPARAMETERS_free(ECPKPARAMETERS *a);
11052   extern const ASN1_ITEM * ECPARAMETERS_it(void);
11053   extern ECPARAMETERS *ECPARAMETERS_new(void); extern void ECPARAMETERS_free(ECPARAMETERS *a);
11054   
11055   
11056   
11057   
11058   
11059   int EC_GROUP_get_basis_type(const EC_GROUP *);
11060   
11061   int EC_GROUP_get_trinomial_basis(const EC_GROUP *, unsigned int *k);
11062   int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1,
11063                                      unsigned int *k2, unsigned int *k3);
11064   
11065   
11066   EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len);
11067   int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out);
11068   # 945 "include/openssl/ec.h"
11069   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECPKParameters_print(BIO *bp, const EC_GROUP *x,
11070                                                  int off);
11071   
11072   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x,
11073                                                     int off);
11074   # 980 "include/openssl/ec.h"
11075   __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *EC_KEY_new_ex(OSSL_LIB_CTX *ctx, const char *propq);
11076   
11077   
11078   
11079   
11080   
11081   
11082   __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *EC_KEY_new(void);
11083   
11084   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_get_flags(const EC_KEY *key);
11085   
11086   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_set_flags(EC_KEY *key, int flags);
11087   
11088   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_clear_flags(EC_KEY *key, int flags);
11089   
11090   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_decoded_from_explicit_params(const EC_KEY *key);
11091   # 1006 "include/openssl/ec.h"
11092   __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *EC_KEY_new_by_curve_name_ex(OSSL_LIB_CTX *ctx,
11093                                                             const char *propq,
11094                                                             int nid);
11095   # 1017 "include/openssl/ec.h"
11096   __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *EC_KEY_new_by_curve_name(int nid);
11097   
11098   
11099   
11100   
11101   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_free(EC_KEY *key);
11102   
11103   
11104   
11105   
11106   
11107   
11108   __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *EC_KEY_copy(EC_KEY *dst, const EC_KEY *src);
11109   
11110   
11111   
11112   
11113   
11114   __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *EC_KEY_dup(const EC_KEY *src);
11115   
11116   
11117   
11118   
11119   
11120   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_up_ref(EC_KEY *key);
11121   
11122   
11123   
11124   
11125   
11126   __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *EC_KEY_get0_engine(const EC_KEY *eckey);
11127   
11128   
11129   
11130   
11131   
11132   __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
11133   
11134   
11135   
11136   
11137   
11138   
11139   
11140   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group);
11141   
11142   
11143   
11144   
11145   
11146   __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
11147   
11148   
11149   
11150   
11151   
11152   
11153   
11154   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv);
11155   
11156   
11157   
11158   
11159   
11160   __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
11161   
11162   
11163   
11164   
11165   
11166   
11167   
11168   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub);
11169   
11170   __attribute__((deprecated("Since OpenSSL " "3.0"))) unsigned EC_KEY_get_enc_flags(const EC_KEY *key);
11171   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags);
11172   __attribute__((deprecated("Since OpenSSL " "3.0"))) point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key);
11173   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_set_conv_form(EC_KEY *eckey,
11174                                                   point_conversion_form_t cform);
11175   
11176   
11177   
11178   
11179   
11180   
11181   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_set_ex_data(EC_KEY *key, int idx, void *arg);
11182   __attribute__((deprecated("Since OpenSSL " "3.0"))) void *EC_KEY_get_ex_data(const EC_KEY *key, int idx);
11183   
11184   
11185   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag);
11186   
11187   
11188   
11189   
11190   
11191   
11192   
11193   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx);
11194   
11195   
11196   
11197   
11198   
11199   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_generate_key(EC_KEY *key);
11200   
11201   
11202   
11203   
11204   
11205   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_check_key(const EC_KEY *key);
11206   
11207   
11208   
11209   
11210   
11211   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_can_sign(const EC_KEY *eckey);
11212   # 1141 "include/openssl/ec.h"
11213   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key,
11214                                                                      BIGNUM *x,
11215                                                                      BIGNUM *y);
11216   # 1152 "include/openssl/ec.h"
11217   __attribute__((deprecated("Since OpenSSL " "3.0"))) size_t EC_KEY_key2buf(const EC_KEY *key,
11218                                               point_conversion_form_t form,
11219                                               unsigned char **pbuf, BN_CTX *ctx);
11220   # 1164 "include/openssl/ec.h"
11221   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_oct2key(EC_KEY *key, const unsigned char *buf,
11222                                            size_t len, BN_CTX *ctx);
11223   # 1174 "include/openssl/ec.h"
11224   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_oct2priv(EC_KEY *key, const unsigned char *buf,
11225                                             size_t len);
11226   # 1185 "include/openssl/ec.h"
11227   __attribute__((deprecated("Since OpenSSL " "3.0"))) size_t EC_KEY_priv2oct(const EC_KEY *key,
11228                                                unsigned char *buf, size_t len);
11229   
11230   
11231   
11232   
11233   
11234   
11235   __attribute__((deprecated("Since OpenSSL " "3.0"))) size_t EC_KEY_priv2buf(const EC_KEY *eckey,
11236                                                unsigned char **pbuf);
11237   # 1206 "include/openssl/ec.h"
11238   __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *d2i_ECPrivateKey(EC_KEY **key,
11239                                                  const unsigned char **in,
11240                                                  long len);
11241   
11242   
11243   
11244   
11245   
11246   
11247   
11248   __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_ECPrivateKey(const EC_KEY *key,
11249                                              unsigned char **out);
11250   # 1230 "include/openssl/ec.h"
11251   __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *d2i_ECParameters(EC_KEY **key,
11252                                                  const unsigned char **in,
11253                                                  long len);
11254   
11255   
11256   
11257   
11258   
11259   
11260   
11261   __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_ECParameters(const EC_KEY *key,
11262                                              unsigned char **out);
11263   # 1255 "include/openssl/ec.h"
11264   __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *o2i_ECPublicKey(EC_KEY **key,
11265                                                 const unsigned char **in, long len);
11266   
11267   
11268   
11269   
11270   
11271   
11272   
11273   __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2o_ECPublicKey(const EC_KEY *key, unsigned char **out);
11274   
11275   
11276   
11277   
11278   
11279   
11280   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECParameters_print(BIO *bp, const EC_KEY *key);
11281   
11282   
11283   
11284   
11285   
11286   
11287   
11288   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_print(BIO *bp, const EC_KEY *key, int off);
11289   
11290   
11291   
11292   
11293   
11294   
11295   
11296   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECParameters_print_fp(FILE *fp, const EC_KEY *key);
11297   
11298   
11299   
11300   
11301   
11302   
11303   
11304   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off);
11305   
11306   
11307   __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_KEY_METHOD *EC_KEY_OpenSSL(void);
11308   __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_KEY_METHOD *EC_KEY_get_default_method(void);
11309   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_set_default_method(const EC_KEY_METHOD *meth);
11310   __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_KEY_METHOD *EC_KEY_get_method(const EC_KEY *key);
11311   __attribute__((deprecated("Since OpenSSL " "3.0"))) int EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth);
11312   __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *EC_KEY_new_method(ENGINE *engine);
11313   
11314   
11315   
11316   
11317   
11318   
11319   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECDH_KDF_X9_62(unsigned char *out, size_t outlen,
11320                                            const unsigned char *Z, size_t Zlen,
11321                                            const unsigned char *sinfo,
11322                                            size_t sinfolen, const EVP_MD *md);
11323   
11324   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECDH_compute_key(void *out, size_t outlen,
11325                                              const EC_POINT *pub_key,
11326                                              const EC_KEY *ecdh,
11327                                              void *(*KDF)(const void *in,
11328                                                           size_t inlen, void *out,
11329                                                           size_t *outlen));
11330   
11331   
11332   typedef struct ECDSA_SIG_st ECDSA_SIG;
11333   
11334   
11335   
11336   
11337   ECDSA_SIG *ECDSA_SIG_new(void);
11338   
11339   
11340   
11341   
11342   void ECDSA_SIG_free(ECDSA_SIG *sig);
11343   # 1342 "include/openssl/ec.h"
11344   extern ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **a, const unsigned char **in, long len); extern int i2d_ECDSA_SIG(const ECDSA_SIG *a, unsigned char **out);
11345   # 1357 "include/openssl/ec.h"
11346   void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
11347   
11348   
11349   
11350   
11351   const BIGNUM *ECDSA_SIG_get0_r(const ECDSA_SIG *sig);
11352   
11353   
11354   
11355   
11356   const BIGNUM *ECDSA_SIG_get0_s(const ECDSA_SIG *sig);
11357   
11358   
11359   
11360   
11361   
11362   
11363   int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s);
11364   # 1384 "include/openssl/ec.h"
11365   __attribute__((deprecated("Since OpenSSL " "3.0"))) ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst,
11366                                                  int dgst_len, EC_KEY *eckey);
11367   # 1397 "include/openssl/ec.h"
11368   __attribute__((deprecated("Since OpenSSL " "3.0"))) ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst,
11369                                                     int dgstlen, const BIGNUM *kinv,
11370                                                     const BIGNUM *rp, EC_KEY *eckey);
11371   # 1410 "include/openssl/ec.h"
11372   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECDSA_do_verify(const unsigned char *dgst, int dgst_len,
11373                                             const ECDSA_SIG *sig, EC_KEY *eckey);
11374   # 1420 "include/openssl/ec.h"
11375   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx,
11376                                              BIGNUM **kinv, BIGNUM **rp);
11377   # 1433 "include/openssl/ec.h"
11378   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECDSA_sign(int type, const unsigned char *dgst,
11379                                        int dgstlen, unsigned char *sig,
11380                                        unsigned int *siglen, EC_KEY *eckey);
11381   # 1450 "include/openssl/ec.h"
11382   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECDSA_sign_ex(int type, const unsigned char *dgst,
11383                                           int dgstlen, unsigned char *sig,
11384                                           unsigned int *siglen, const BIGNUM *kinv,
11385                                           const BIGNUM *rp, EC_KEY *eckey);
11386   # 1466 "include/openssl/ec.h"
11387   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECDSA_verify(int type, const unsigned char *dgst,
11388                                          int dgstlen, const unsigned char *sig,
11389                                          int siglen, EC_KEY *eckey);
11390   
11391   
11392   
11393   
11394   
11395   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ECDSA_size(const EC_KEY *eckey);
11396   
11397   
11398   
11399   
11400   
11401   __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY_METHOD *EC_KEY_METHOD_new(const EC_KEY_METHOD *meth);
11402   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_free(EC_KEY_METHOD *meth);
11403   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_set_init
11404                         (EC_KEY_METHOD *meth,
11405                          int (*init)(EC_KEY *key),
11406                          void (*finish)(EC_KEY *key),
11407                          int (*copy)(EC_KEY *dest, const EC_KEY *src),
11408                          int (*set_group)(EC_KEY *key, const EC_GROUP *grp),
11409                          int (*set_private)(EC_KEY *key, const BIGNUM *priv_key),
11410                          int (*set_public)(EC_KEY *key, const EC_POINT *pub_key));
11411   
11412   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_set_keygen(EC_KEY_METHOD *meth,
11413                                                       int (*keygen)(EC_KEY *key));
11414   
11415   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_set_compute_key
11416                         (EC_KEY_METHOD *meth,
11417                          int (*ckey)(unsigned char **psec, size_t *pseclen,
11418                                      const EC_POINT *pub_key, const EC_KEY *ecdh));
11419   
11420   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_set_sign
11421                         (EC_KEY_METHOD *meth,
11422                          int (*sign)(int type, const unsigned char *dgst,
11423                                      int dlen, unsigned char *sig,
11424                                      unsigned int *siglen,
11425                                      const BIGNUM *kinv, const BIGNUM *r,
11426                                      EC_KEY *eckey),
11427                          int (*sign_setup)(EC_KEY *eckey, BN_CTX *ctx_in,
11428                                            BIGNUM **kinvp, BIGNUM **rp),
11429                          ECDSA_SIG *(*sign_sig)(const unsigned char *dgst,
11430                                                 int dgst_len,
11431                                                 const BIGNUM *in_kinv,
11432                                                 const BIGNUM *in_r,
11433                                                 EC_KEY *eckey));
11434   
11435   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_set_verify
11436                         (EC_KEY_METHOD *meth,
11437                          int (*verify)(int type, const unsigned
11438                                        char *dgst, int dgst_len,
11439                                        const unsigned char *sigbuf,
11440                                        int sig_len, EC_KEY *eckey),
11441                          int (*verify_sig)(const unsigned char *dgst,
11442                                            int dgst_len, const ECDSA_SIG *sig,
11443                                            EC_KEY *eckey));
11444   
11445   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_get_init
11446                         (const EC_KEY_METHOD *meth,
11447                          int (**pinit)(EC_KEY *key),
11448                          void (**pfinish)(EC_KEY *key),
11449                          int (**pcopy)(EC_KEY *dest, const EC_KEY *src),
11450                          int (**pset_group)(EC_KEY *key, const EC_GROUP *grp),
11451                          int (**pset_private)(EC_KEY *key, const BIGNUM *priv_key),
11452                          int (**pset_public)(EC_KEY *key, const EC_POINT *pub_key));
11453   
11454   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_get_keygen
11455                         (const EC_KEY_METHOD *meth, int (**pkeygen)(EC_KEY *key));
11456   
11457   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_get_compute_key
11458                         (const EC_KEY_METHOD *meth,
11459                          int (**pck)(unsigned char **psec,
11460                          size_t *pseclen,
11461                          const EC_POINT *pub_key,
11462                          const EC_KEY *ecdh));
11463   
11464   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_get_sign
11465                         (const EC_KEY_METHOD *meth,
11466                          int (**psign)(int type, const unsigned char *dgst,
11467                                        int dlen, unsigned char *sig,
11468                                        unsigned int *siglen,
11469                                        const BIGNUM *kinv, const BIGNUM *r,
11470                                        EC_KEY *eckey),
11471                          int (**psign_setup)(EC_KEY *eckey, BN_CTX *ctx_in,
11472                                              BIGNUM **kinvp, BIGNUM **rp),
11473                          ECDSA_SIG *(**psign_sig)(const unsigned char *dgst,
11474                                                   int dgst_len,
11475                                                   const BIGNUM *in_kinv,
11476                                                   const BIGNUM *in_r,
11477                                                   EC_KEY *eckey));
11478   
11479   __attribute__((deprecated("Since OpenSSL " "3.0"))) void EC_KEY_METHOD_get_verify
11480                         (const EC_KEY_METHOD *meth,
11481                          int (**pverify)(int type, const unsigned
11482                                          char *dgst, int dgst_len,
11483                                          const unsigned char *sigbuf,
11484                                          int sig_len, EC_KEY *eckey),
11485                          int (**pverify_sig)(const unsigned char *dgst,
11486                                              int dgst_len,
11487                                              const ECDSA_SIG *sig,
11488                                              EC_KEY *eckey));
11489   # 34 "include/openssl/x509.h" 2
11490   
11491   
11492   # 1 "include/openssl/rsa.h" 1
11493   # 12 "include/openssl/rsa.h"
11494           
11495   # 24 "include/openssl/rsa.h"
11496   # 1 "include/openssl/types.h" 1
11497   # 25 "include/openssl/rsa.h" 2
11498   
11499   
11500   
11501   # 1 "include/openssl/rsaerr.h" 1
11502   # 13 "include/openssl/rsaerr.h"
11503           
11504   # 29 "include/openssl/rsa.h" 2
11505   # 122 "include/openssl/rsa.h"
11506   int EVP_PKEY_CTX_set_rsa_padding(EVP_PKEY_CTX *ctx, int pad_mode);
11507   int EVP_PKEY_CTX_get_rsa_padding(EVP_PKEY_CTX *ctx, int *pad_mode);
11508   
11509   int EVP_PKEY_CTX_set_rsa_pss_saltlen(EVP_PKEY_CTX *ctx, int saltlen);
11510   int EVP_PKEY_CTX_get_rsa_pss_saltlen(EVP_PKEY_CTX *ctx, int *saltlen);
11511   
11512   int EVP_PKEY_CTX_set_rsa_keygen_bits(EVP_PKEY_CTX *ctx, int bits);
11513   int EVP_PKEY_CTX_set1_rsa_keygen_pubexp(EVP_PKEY_CTX *ctx, BIGNUM *pubexp);
11514   int EVP_PKEY_CTX_set_rsa_keygen_primes(EVP_PKEY_CTX *ctx, int primes);
11515   int EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen(EVP_PKEY_CTX *ctx, int saltlen);
11516   
11517   __attribute__((deprecated("Since OpenSSL " "3.0")))
11518   int EVP_PKEY_CTX_set_rsa_keygen_pubexp(EVP_PKEY_CTX *ctx, BIGNUM *pubexp);
11519   # 149 "include/openssl/rsa.h"
11520   int EVP_PKEY_CTX_set_rsa_mgf1_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
11521   int EVP_PKEY_CTX_set_rsa_mgf1_md_name(EVP_PKEY_CTX *ctx, const char *mdname,
11522                                         const char *mdprops);
11523   int EVP_PKEY_CTX_get_rsa_mgf1_md(EVP_PKEY_CTX *ctx, const EVP_MD **md);
11524   int EVP_PKEY_CTX_get_rsa_mgf1_md_name(EVP_PKEY_CTX *ctx, char *name,
11525                                         size_t namelen);
11526   int EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
11527   int EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md_name(EVP_PKEY_CTX *ctx,
11528                                                    const char *mdname);
11529   
11530   int EVP_PKEY_CTX_set_rsa_pss_keygen_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
11531   int EVP_PKEY_CTX_set_rsa_pss_keygen_md_name(EVP_PKEY_CTX *ctx,
11532                                               const char *mdname,
11533                                               const char *mdprops);
11534   
11535   int EVP_PKEY_CTX_set_rsa_oaep_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
11536   int EVP_PKEY_CTX_set_rsa_oaep_md_name(EVP_PKEY_CTX *ctx, const char *mdname,
11537                                         const char *mdprops);
11538   int EVP_PKEY_CTX_get_rsa_oaep_md(EVP_PKEY_CTX *ctx, const EVP_MD **md);
11539   int EVP_PKEY_CTX_get_rsa_oaep_md_name(EVP_PKEY_CTX *ctx, char *name,
11540                                         size_t namelen);
11541   int EVP_PKEY_CTX_set0_rsa_oaep_label(EVP_PKEY_CTX *ctx, void *label, int llen);
11542   int EVP_PKEY_CTX_get0_rsa_oaep_label(EVP_PKEY_CTX *ctx, unsigned char **label);
11543   # 212 "include/openssl/rsa.h"
11544   __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *RSA_new(void);
11545   __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *RSA_new_method(ENGINE *engine);
11546   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_bits(const RSA *rsa);
11547   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_size(const RSA *rsa);
11548   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_security_bits(const RSA *rsa);
11549   
11550   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
11551   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q);
11552   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_set0_crt_params(RSA *r,
11553                                                 BIGNUM *dmp1, BIGNUM *dmq1,
11554                                                 BIGNUM *iqmp);
11555   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_set0_multi_prime_params(RSA *r,
11556                                                         BIGNUM *primes[],
11557                                                         BIGNUM *exps[],
11558                                                         BIGNUM *coeffs[],
11559                                                         int pnum);
11560   __attribute__((deprecated("Since OpenSSL " "3.0"))) void RSA_get0_key(const RSA *r,
11561                                           const BIGNUM **n, const BIGNUM **e,
11562                                           const BIGNUM **d);
11563   __attribute__((deprecated("Since OpenSSL " "3.0"))) void RSA_get0_factors(const RSA *r,
11564                                               const BIGNUM **p, const BIGNUM **q);
11565   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_get_multi_prime_extra_count(const RSA *r);
11566   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_get0_multi_prime_factors(const RSA *r,
11567                                                          const BIGNUM *primes[]);
11568   __attribute__((deprecated("Since OpenSSL " "3.0"))) void RSA_get0_crt_params(const RSA *r,
11569                                                  const BIGNUM **dmp1,
11570                                                  const BIGNUM **dmq1,
11571                                                  const BIGNUM **iqmp);
11572   __attribute__((deprecated("Since OpenSSL " "3.0")))
11573   int RSA_get0_multi_prime_crt_params(const RSA *r, const BIGNUM *exps[],
11574                                       const BIGNUM *coeffs[]);
11575   __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *RSA_get0_n(const RSA *d);
11576   __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *RSA_get0_e(const RSA *d);
11577   __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *RSA_get0_d(const RSA *d);
11578   __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *RSA_get0_p(const RSA *d);
11579   __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *RSA_get0_q(const RSA *d);
11580   __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *RSA_get0_dmp1(const RSA *r);
11581   __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *RSA_get0_dmq1(const RSA *r);
11582   __attribute__((deprecated("Since OpenSSL " "3.0"))) const BIGNUM *RSA_get0_iqmp(const RSA *r);
11583   __attribute__((deprecated("Since OpenSSL " "3.0"))) const RSA_PSS_PARAMS *RSA_get0_pss_params(const RSA *r);
11584   __attribute__((deprecated("Since OpenSSL " "3.0"))) void RSA_clear_flags(RSA *r, int flags);
11585   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_test_flags(const RSA *r, int flags);
11586   __attribute__((deprecated("Since OpenSSL " "3.0"))) void RSA_set_flags(RSA *r, int flags);
11587   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_get_version(RSA *r);
11588   __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *RSA_get0_engine(const RSA *r);
11589   
11590   
11591   
11592   
11593   
11594   
11595   
11596   __attribute__((deprecated("Since OpenSSL " "0.9.8"))) RSA *RSA_generate_key(int bits, unsigned long e, void
11597                                                 (*callback) (int, int, void *),
11598                                                 void *cb_arg);
11599   
11600   
11601   
11602   
11603   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e,
11604                                                 BN_GENCB *cb);
11605   
11606   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_generate_multi_prime_key(RSA *rsa, int bits,
11607                                                          int primes, BIGNUM *e,
11608                                                          BN_GENCB *cb);
11609   
11610   __attribute__((deprecated("Since OpenSSL " "3.0")))
11611   int RSA_X931_derive_ex(RSA *rsa, BIGNUM *p1, BIGNUM *p2,
11612                          BIGNUM *q1, BIGNUM *q2,
11613                          const BIGNUM *Xp1, const BIGNUM *Xp2,
11614                          const BIGNUM *Xp, const BIGNUM *Xq1,
11615                          const BIGNUM *Xq2, const BIGNUM *Xq,
11616                          const BIGNUM *e, BN_GENCB *cb);
11617   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_X931_generate_key_ex(RSA *rsa, int bits,
11618                                                      const BIGNUM *e,
11619                                                      BN_GENCB *cb);
11620   
11621   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_check_key(const RSA *);
11622   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_check_key_ex(const RSA *, BN_GENCB *cb);
11623   
11624   __attribute__((deprecated("Since OpenSSL " "3.0")))
11625   int RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to,
11626                          RSA *rsa, int padding);
11627   __attribute__((deprecated("Since OpenSSL " "3.0")))
11628   int RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to,
11629                           RSA *rsa, int padding);
11630   __attribute__((deprecated("Since OpenSSL " "3.0")))
11631   int RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to,
11632                          RSA *rsa, int padding);
11633   __attribute__((deprecated("Since OpenSSL " "3.0")))
11634   int RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to,
11635                           RSA *rsa, int padding);
11636   __attribute__((deprecated("Since OpenSSL " "3.0"))) void RSA_free(RSA *r);
11637   
11638   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_up_ref(RSA *r);
11639   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_flags(const RSA *r);
11640   
11641   __attribute__((deprecated("Since OpenSSL " "3.0"))) void RSA_set_default_method(const RSA_METHOD *meth);
11642   __attribute__((deprecated("Since OpenSSL " "3.0"))) const RSA_METHOD *RSA_get_default_method(void);
11643   __attribute__((deprecated("Since OpenSSL " "3.0"))) const RSA_METHOD *RSA_null_method(void);
11644   __attribute__((deprecated("Since OpenSSL " "3.0"))) const RSA_METHOD *RSA_get_method(const RSA *rsa);
11645   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);
11646   
11647   
11648   __attribute__((deprecated("Since OpenSSL " "3.0"))) const RSA_METHOD *RSA_PKCS1_OpenSSL(void);
11649   
11650   __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *d2i_RSAPublicKey(RSA **a, const unsigned char **in, long len); __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_RSAPublicKey(const RSA *a, unsigned char **out); __attribute__((deprecated("Since OpenSSL " "3.0"))) const ASN1_ITEM * RSAPublicKey_it(void);
11651   
11652   __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *d2i_RSAPrivateKey(RSA **a, const unsigned char **in, long len); __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_RSAPrivateKey(const RSA *a, unsigned char **out); __attribute__((deprecated("Since OpenSSL " "3.0"))) const ASN1_ITEM * RSAPrivateKey_it(void);
11653   
11654   
11655   
11656   int RSA_pkey_ctx_ctrl(EVP_PKEY_CTX *ctx, int optype, int cmd, int p1, void *p2);
11657   
11658   struct rsa_pss_params_st {
11659       X509_ALGOR *hashAlgorithm;
11660       X509_ALGOR *maskGenAlgorithm;
11661       ASN1_INTEGER *saltLength;
11662       ASN1_INTEGER *trailerField;
11663   
11664       X509_ALGOR *maskHash;
11665   };
11666   
11667   extern RSA_PSS_PARAMS *RSA_PSS_PARAMS_new(void); extern void RSA_PSS_PARAMS_free(RSA_PSS_PARAMS *a); extern RSA_PSS_PARAMS *d2i_RSA_PSS_PARAMS(RSA_PSS_PARAMS **a, const unsigned char **in, long len); extern int i2d_RSA_PSS_PARAMS(const RSA_PSS_PARAMS *a, unsigned char **out); extern const ASN1_ITEM * RSA_PSS_PARAMS_it(void);
11668   extern RSA_PSS_PARAMS *RSA_PSS_PARAMS_dup(const RSA_PSS_PARAMS *a);
11669   
11670   typedef struct rsa_oaep_params_st {
11671       X509_ALGOR *hashFunc;
11672       X509_ALGOR *maskGenFunc;
11673       X509_ALGOR *pSourceFunc;
11674   
11675       X509_ALGOR *maskHash;
11676   } RSA_OAEP_PARAMS;
11677   
11678   extern RSA_OAEP_PARAMS *RSA_OAEP_PARAMS_new(void); extern void RSA_OAEP_PARAMS_free(RSA_OAEP_PARAMS *a); extern RSA_OAEP_PARAMS *d2i_RSA_OAEP_PARAMS(RSA_OAEP_PARAMS **a, const unsigned char **in, long len); extern int i2d_RSA_OAEP_PARAMS(const RSA_OAEP_PARAMS *a, unsigned char **out); extern const ASN1_ITEM * RSA_OAEP_PARAMS_it(void);
11679   
11680   
11681   
11682   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_print_fp(FILE *fp, const RSA *r, int offset);
11683   
11684   
11685   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_print(BIO *bp, const RSA *r, int offset);
11686   
11687   
11688   
11689   
11690   
11691   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_sign(int type, const unsigned char *m,
11692                                      unsigned int m_length, unsigned char *sigret,
11693                                      unsigned int *siglen, RSA *rsa);
11694   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_verify(int type, const unsigned char *m,
11695                                        unsigned int m_length,
11696                                        const unsigned char *sigbuf,
11697                                        unsigned int siglen, RSA *rsa);
11698   
11699   
11700   
11701   
11702   
11703   __attribute__((deprecated("Since OpenSSL " "3.0")))
11704   int RSA_sign_ASN1_OCTET_STRING(int type,
11705                                  const unsigned char *m, unsigned int m_length,
11706                                  unsigned char *sigret, unsigned int *siglen,
11707                                  RSA *rsa);
11708   __attribute__((deprecated("Since OpenSSL " "3.0")))
11709   int RSA_verify_ASN1_OCTET_STRING(int type,
11710                                    const unsigned char *m, unsigned int m_length,
11711                                    unsigned char *sigbuf, unsigned int siglen,
11712                                    RSA *rsa);
11713   
11714   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_blinding_on(RSA *rsa, BN_CTX *ctx);
11715   __attribute__((deprecated("Since OpenSSL " "3.0"))) void RSA_blinding_off(RSA *rsa);
11716   __attribute__((deprecated("Since OpenSSL " "3.0"))) BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx);
11717   
11718   __attribute__((deprecated("Since OpenSSL " "3.0")))
11719   int RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen,
11720                                    const unsigned char *f, int fl);
11721   __attribute__((deprecated("Since OpenSSL " "3.0")))
11722   int RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen,
11723                                      const unsigned char *f, int fl,
11724                                      int rsa_len);
11725   __attribute__((deprecated("Since OpenSSL " "3.0")))
11726   int RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen,
11727                                    const unsigned char *f, int fl);
11728   __attribute__((deprecated("Since OpenSSL " "3.0")))
11729   int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen,
11730                                      const unsigned char *f, int fl,
11731                                      int rsa_len);
11732   __attribute__((deprecated("Since OpenSSL " "3.0"))) int PKCS1_MGF1(unsigned char *mask, long len,
11733                                        const unsigned char *seed, long seedlen,
11734                                        const EVP_MD *dgst);
11735   __attribute__((deprecated("Since OpenSSL " "3.0")))
11736   int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
11737                                  const unsigned char *f, int fl,
11738                                  const unsigned char *p, int pl);
11739   __attribute__((deprecated("Since OpenSSL " "3.0")))
11740   int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,
11741                                    const unsigned char *f, int fl, int rsa_len,
11742                                    const unsigned char *p, int pl);
11743   __attribute__((deprecated("Since OpenSSL " "3.0")))
11744   int RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
11745                                       const unsigned char *from, int flen,
11746                                       const unsigned char *param, int plen,
11747                                       const EVP_MD *md, const EVP_MD *mgf1md);
11748   __attribute__((deprecated("Since OpenSSL " "3.0")))
11749   int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
11750                                         const unsigned char *from, int flen,
11751                                         int num,
11752                                         const unsigned char *param, int plen,
11753                                         const EVP_MD *md, const EVP_MD *mgf1md);
11754   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_padding_add_none(unsigned char *to, int tlen,
11755                                                  const unsigned char *f, int fl);
11756   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_padding_check_none(unsigned char *to, int tlen,
11757                                                    const unsigned char *f, int fl,
11758                                                    int rsa_len);
11759   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_padding_add_X931(unsigned char *to, int tlen,
11760                                                  const unsigned char *f, int fl);
11761   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_padding_check_X931(unsigned char *to, int tlen,
11762                                                    const unsigned char *f, int fl,
11763                                                    int rsa_len);
11764   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_X931_hash_id(int nid);
11765   
11766   __attribute__((deprecated("Since OpenSSL " "3.0")))
11767   int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
11768                            const EVP_MD *Hash, const unsigned char *EM,
11769                            int sLen);
11770   __attribute__((deprecated("Since OpenSSL " "3.0")))
11771   int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
11772                                 const unsigned char *mHash, const EVP_MD *Hash,
11773                                 int sLen);
11774   
11775   __attribute__((deprecated("Since OpenSSL " "3.0")))
11776   int RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash,
11777                                 const EVP_MD *Hash, const EVP_MD *mgf1Hash,
11778                                 const unsigned char *EM, int sLen);
11779   
11780   __attribute__((deprecated("Since OpenSSL " "3.0")))
11781   int RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM,
11782                                      const unsigned char *mHash,
11783                                      const EVP_MD *Hash, const EVP_MD *mgf1Hash,
11784                                      int sLen);
11785   
11786   
11787   
11788   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_set_ex_data(RSA *r, int idx, void *arg);
11789   __attribute__((deprecated("Since OpenSSL " "3.0"))) void *RSA_get_ex_data(const RSA *r, int idx);
11790   
11791   __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *RSAPublicKey_dup(const RSA *a);
11792   __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *RSAPrivateKey_dup(const RSA *a);
11793   # 484 "include/openssl/rsa.h"
11794   __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA_METHOD *RSA_meth_new(const char *name, int flags);
11795   __attribute__((deprecated("Since OpenSSL " "3.0"))) void RSA_meth_free(RSA_METHOD *meth);
11796   __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth);
11797   __attribute__((deprecated("Since OpenSSL " "3.0"))) const char *RSA_meth_get0_name(const RSA_METHOD *meth);
11798   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_meth_set1_name(RSA_METHOD *meth,
11799                                                const char *name);
11800   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_meth_get_flags(const RSA_METHOD *meth);
11801   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_meth_set_flags(RSA_METHOD *meth, int flags);
11802   __attribute__((deprecated("Since OpenSSL " "3.0"))) void *RSA_meth_get0_app_data(const RSA_METHOD *meth);
11803   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RSA_meth_set0_app_data(RSA_METHOD *meth,
11804                                                    void *app_data);
11805   __attribute__((deprecated("Since OpenSSL " "3.0")))
11806   int (*RSA_meth_get_pub_enc(const RSA_METHOD *meth)) (int flen,
11807                                                        const unsigned char *from,
11808                                                        unsigned char *to,
11809                                                        RSA *rsa, int padding);
11810   __attribute__((deprecated("Since OpenSSL " "3.0")))
11811   int RSA_meth_set_pub_enc(RSA_METHOD *rsa,
11812                            int (*pub_enc) (int flen, const unsigned char *from,
11813                                            unsigned char *to, RSA *rsa,
11814                                            int padding));
11815   __attribute__((deprecated("Since OpenSSL " "3.0")))
11816   int (*RSA_meth_get_pub_dec(const RSA_METHOD *meth)) (int flen,
11817                                                        const unsigned char *from,
11818                                                        unsigned char *to,
11819                                                        RSA *rsa, int padding);
11820   __attribute__((deprecated("Since OpenSSL " "3.0")))
11821   int RSA_meth_set_pub_dec(RSA_METHOD *rsa,
11822                            int (*pub_dec) (int flen, const unsigned char *from,
11823                                            unsigned char *to, RSA *rsa,
11824                                            int padding));
11825   __attribute__((deprecated("Since OpenSSL " "3.0")))
11826   int (*RSA_meth_get_priv_enc(const RSA_METHOD *meth)) (int flen,
11827                                                         const unsigned char *from,
11828                                                         unsigned char *to,
11829                                                         RSA *rsa, int padding);
11830   __attribute__((deprecated("Since OpenSSL " "3.0")))
11831   int RSA_meth_set_priv_enc(RSA_METHOD *rsa,
11832                             int (*priv_enc) (int flen, const unsigned char *from,
11833                                              unsigned char *to, RSA *rsa,
11834                                              int padding));
11835   __attribute__((deprecated("Since OpenSSL " "3.0")))
11836   int (*RSA_meth_get_priv_dec(const RSA_METHOD *meth)) (int flen,
11837                                                         const unsigned char *from,
11838                                                         unsigned char *to,
11839                                                         RSA *rsa, int padding);
11840   __attribute__((deprecated("Since OpenSSL " "3.0")))
11841   int RSA_meth_set_priv_dec(RSA_METHOD *rsa,
11842                             int (*priv_dec) (int flen, const unsigned char *from,
11843                                              unsigned char *to, RSA *rsa,
11844                                              int padding));
11845   __attribute__((deprecated("Since OpenSSL " "3.0")))
11846   int (*RSA_meth_get_mod_exp(const RSA_METHOD *meth)) (BIGNUM *r0,
11847                                                        const BIGNUM *i,
11848                                                        RSA *rsa, BN_CTX *ctx);
11849   __attribute__((deprecated("Since OpenSSL " "3.0")))
11850   int RSA_meth_set_mod_exp(RSA_METHOD *rsa,
11851                            int (*mod_exp) (BIGNUM *r0, const BIGNUM *i, RSA *rsa,
11852                                            BN_CTX *ctx));
11853   __attribute__((deprecated("Since OpenSSL " "3.0")))
11854   int (*RSA_meth_get_bn_mod_exp(const RSA_METHOD *meth)) (BIGNUM *r,
11855                                                           const BIGNUM *a,
11856                                                           const BIGNUM *p,
11857                                                           const BIGNUM *m,
11858                                                           BN_CTX *ctx,
11859                                                           BN_MONT_CTX *m_ctx);
11860   __attribute__((deprecated("Since OpenSSL " "3.0")))
11861   int RSA_meth_set_bn_mod_exp(RSA_METHOD *rsa,
11862                               int (*bn_mod_exp) (BIGNUM *r,
11863                                                  const BIGNUM *a,
11864                                                  const BIGNUM *p,
11865                                                  const BIGNUM *m,
11866                                                  BN_CTX *ctx,
11867                                                  BN_MONT_CTX *m_ctx));
11868   __attribute__((deprecated("Since OpenSSL " "3.0")))
11869   int (*RSA_meth_get_init(const RSA_METHOD *meth)) (RSA *rsa);
11870   __attribute__((deprecated("Since OpenSSL " "3.0")))
11871   int RSA_meth_set_init(RSA_METHOD *rsa, int (*init) (RSA *rsa));
11872   __attribute__((deprecated("Since OpenSSL " "3.0")))
11873   int (*RSA_meth_get_finish(const RSA_METHOD *meth)) (RSA *rsa);
11874   __attribute__((deprecated("Since OpenSSL " "3.0")))
11875   int RSA_meth_set_finish(RSA_METHOD *rsa, int (*finish) (RSA *rsa));
11876   __attribute__((deprecated("Since OpenSSL " "3.0")))
11877   int (*RSA_meth_get_sign(const RSA_METHOD *meth)) (int type,
11878                                                     const unsigned char *m,
11879                                                     unsigned int m_length,
11880                                                     unsigned char *sigret,
11881                                                     unsigned int *siglen,
11882                                                     const RSA *rsa);
11883   __attribute__((deprecated("Since OpenSSL " "3.0")))
11884   int RSA_meth_set_sign(RSA_METHOD *rsa,
11885                         int (*sign) (int type, const unsigned char *m,
11886                                      unsigned int m_length,
11887                                      unsigned char *sigret, unsigned int *siglen,
11888                                      const RSA *rsa));
11889   __attribute__((deprecated("Since OpenSSL " "3.0")))
11890   int (*RSA_meth_get_verify(const RSA_METHOD *meth)) (int dtype,
11891                                                       const unsigned char *m,
11892                                                       unsigned int m_length,
11893                                                       const unsigned char *sigbuf,
11894                                                       unsigned int siglen,
11895                                                       const RSA *rsa);
11896   __attribute__((deprecated("Since OpenSSL " "3.0")))
11897   int RSA_meth_set_verify(RSA_METHOD *rsa,
11898                           int (*verify) (int dtype, const unsigned char *m,
11899                                          unsigned int m_length,
11900                                          const unsigned char *sigbuf,
11901                                          unsigned int siglen, const RSA *rsa));
11902   __attribute__((deprecated("Since OpenSSL " "3.0")))
11903   int (*RSA_meth_get_keygen(const RSA_METHOD *meth)) (RSA *rsa, int bits,
11904                                                       BIGNUM *e, BN_GENCB *cb);
11905   __attribute__((deprecated("Since OpenSSL " "3.0")))
11906   int RSA_meth_set_keygen(RSA_METHOD *rsa,
11907                           int (*keygen) (RSA *rsa, int bits, BIGNUM *e,
11908                                          BN_GENCB *cb));
11909   __attribute__((deprecated("Since OpenSSL " "3.0")))
11910   int (*RSA_meth_get_multi_prime_keygen(const RSA_METHOD *meth)) (RSA *rsa,
11911                                                                   int bits,
11912                                                                   int primes,
11913                                                                   BIGNUM *e,
11914                                                                   BN_GENCB *cb);
11915   __attribute__((deprecated("Since OpenSSL " "3.0")))
11916   int RSA_meth_set_multi_prime_keygen(RSA_METHOD *meth,
11917                                       int (*keygen) (RSA *rsa, int bits,
11918                                                      int primes, BIGNUM *e,
11919                                                      BN_GENCB *cb));
11920   # 37 "include/openssl/x509.h" 2
11921   
11922   
11923   
11924   
11925   # 1 "include/openssl/sha.h" 1
11926   # 12 "include/openssl/sha.h"
11927           
11928   
11929   
11930   
11931   
11932   
11933   
11934   
11935   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 1 3 4
11936   # 21 "include/openssl/sha.h" 2
11937   # 42 "include/openssl/sha.h"
11938   typedef struct SHAstate_st {
11939       unsigned int h0, h1, h2, h3, h4;
11940       unsigned int Nl, Nh;
11941       unsigned int data[16];
11942       unsigned int num;
11943   } SHA_CTX;
11944   
11945   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA1_Init(SHA_CTX *c);
11946   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
11947   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA1_Final(unsigned char *md, SHA_CTX *c);
11948   __attribute__((deprecated("Since OpenSSL " "3.0"))) void SHA1_Transform(SHA_CTX *c, const unsigned char *data);
11949   
11950   
11951   unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md);
11952   
11953   
11954   
11955   
11956   
11957   
11958   typedef struct SHA256state_st {
11959       unsigned int h[8];
11960       unsigned int Nl, Nh;
11961       unsigned int data[16];
11962       unsigned int num, md_len;
11963   } SHA256_CTX;
11964   
11965   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA224_Init(SHA256_CTX *c);
11966   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA224_Update(SHA256_CTX *c,
11967                                           const void *data, size_t len);
11968   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA224_Final(unsigned char *md, SHA256_CTX *c);
11969   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA256_Init(SHA256_CTX *c);
11970   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA256_Update(SHA256_CTX *c,
11971                                           const void *data, size_t len);
11972   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA256_Final(unsigned char *md, SHA256_CTX *c);
11973   __attribute__((deprecated("Since OpenSSL " "3.0"))) void SHA256_Transform(SHA256_CTX *c,
11974                                               const unsigned char *data);
11975   
11976   
11977   unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md);
11978   unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md);
11979   # 110 "include/openssl/sha.h"
11980   typedef struct SHA512state_st {
11981       unsigned long long h[8];
11982       unsigned long long Nl, Nh;
11983       union {
11984           unsigned long long d[16];
11985           unsigned char p[(16*8)];
11986       } u;
11987       unsigned int num, md_len;
11988   } SHA512_CTX;
11989   
11990   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA384_Init(SHA512_CTX *c);
11991   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA384_Update(SHA512_CTX *c,
11992                                           const void *data, size_t len);
11993   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA384_Final(unsigned char *md, SHA512_CTX *c);
11994   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA512_Init(SHA512_CTX *c);
11995   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA512_Update(SHA512_CTX *c,
11996                                           const void *data, size_t len);
11997   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SHA512_Final(unsigned char *md, SHA512_CTX *c);
11998   __attribute__((deprecated("Since OpenSSL " "3.0"))) void SHA512_Transform(SHA512_CTX *c,
11999                                               const unsigned char *data);
12000   
12001   
12002   unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md);
12003   unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md);
12004   # 42 "include/openssl/x509.h" 2
12005   # 1 "include/openssl/x509err.h" 1
12006   # 13 "include/openssl/x509err.h"
12007           
12008   # 43 "include/openssl/x509.h" 2
12009   # 52 "include/openssl/x509.h"
12010   struct stack_st_X509_NAME; typedef int (*sk_X509_NAME_compfunc)(const X509_NAME * const *a, const X509_NAME *const *b); typedef void (*sk_X509_NAME_freefunc)(X509_NAME *a); typedef X509_NAME * (*sk_X509_NAME_copyfunc)(const X509_NAME *a); static __attribute__((unused)) inline X509_NAME *ossl_check_X509_NAME_type(X509_NAME *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_NAME_sk_type(const struct stack_st_X509_NAME *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_NAME_sk_type(struct stack_st_X509_NAME *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_NAME_compfunc_type(sk_X509_NAME_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_NAME_copyfunc_type(sk_X509_NAME_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_NAME_freefunc_type(sk_X509_NAME_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12011   # 78 "include/openssl/x509.h"
12012   struct stack_st_X509; typedef int (*sk_X509_compfunc)(const X509 * const *a, const X509 *const *b); typedef void (*sk_X509_freefunc)(X509 *a); typedef X509 * (*sk_X509_copyfunc)(const X509 *a); static __attribute__((unused)) inline X509 *ossl_check_X509_type(X509 *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_sk_type(const struct stack_st_X509 *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_sk_type(struct stack_st_X509 *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_compfunc_type(sk_X509_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_copyfunc_type(sk_X509_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_freefunc_type(sk_X509_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12013   # 104 "include/openssl/x509.h"
12014   struct stack_st_X509_REVOKED; typedef int (*sk_X509_REVOKED_compfunc)(const X509_REVOKED * const *a, const X509_REVOKED *const *b); typedef void (*sk_X509_REVOKED_freefunc)(X509_REVOKED *a); typedef X509_REVOKED * (*sk_X509_REVOKED_copyfunc)(const X509_REVOKED *a); static __attribute__((unused)) inline X509_REVOKED *ossl_check_X509_REVOKED_type(X509_REVOKED *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_REVOKED_sk_type(const struct stack_st_X509_REVOKED *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_REVOKED_sk_type(struct stack_st_X509_REVOKED *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_REVOKED_compfunc_type(sk_X509_REVOKED_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_REVOKED_copyfunc_type(sk_X509_REVOKED_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_REVOKED_freefunc_type(sk_X509_REVOKED_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12015   # 130 "include/openssl/x509.h"
12016   struct stack_st_X509_CRL; typedef int (*sk_X509_CRL_compfunc)(const X509_CRL * const *a, const X509_CRL *const *b); typedef void (*sk_X509_CRL_freefunc)(X509_CRL *a); typedef X509_CRL * (*sk_X509_CRL_copyfunc)(const X509_CRL *a); static __attribute__((unused)) inline X509_CRL *ossl_check_X509_CRL_type(X509_CRL *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_CRL_sk_type(const struct stack_st_X509_CRL *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_CRL_sk_type(struct stack_st_X509_CRL *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_CRL_compfunc_type(sk_X509_CRL_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_CRL_copyfunc_type(sk_X509_CRL_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_CRL_freefunc_type(sk_X509_CRL_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12017   # 179 "include/openssl/x509.h"
12018   struct X509_algor_st {
12019       ASN1_OBJECT *algorithm;
12020       ASN1_TYPE *parameter;
12021   } ;
12022   
12023   typedef struct stack_st_X509_ALGOR X509_ALGORS;
12024   
12025   typedef struct X509_val_st {
12026       ASN1_TIME *notBefore;
12027       ASN1_TIME *notAfter;
12028   } X509_VAL;
12029   
12030   typedef struct X509_sig_st X509_SIG;
12031   
12032   typedef struct X509_name_entry_st X509_NAME_ENTRY;
12033   
12034   struct stack_st_X509_NAME_ENTRY; typedef int (*sk_X509_NAME_ENTRY_compfunc)(const X509_NAME_ENTRY * const *a, const X509_NAME_ENTRY *const *b); typedef void (*sk_X509_NAME_ENTRY_freefunc)(X509_NAME_ENTRY *a); typedef X509_NAME_ENTRY * (*sk_X509_NAME_ENTRY_copyfunc)(const X509_NAME_ENTRY *a); static __attribute__((unused)) inline X509_NAME_ENTRY *ossl_check_X509_NAME_ENTRY_type(X509_NAME_ENTRY *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_NAME_ENTRY_sk_type(const struct stack_st_X509_NAME_ENTRY *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_NAME_ENTRY_sk_type(struct stack_st_X509_NAME_ENTRY *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_NAME_ENTRY_compfunc_type(sk_X509_NAME_ENTRY_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_NAME_ENTRY_copyfunc_type(sk_X509_NAME_ENTRY_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_NAME_ENTRY_freefunc_type(sk_X509_NAME_ENTRY_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12035   # 225 "include/openssl/x509.h"
12036   typedef struct X509_extension_st X509_EXTENSION;
12037   struct stack_st_X509_EXTENSION; typedef int (*sk_X509_EXTENSION_compfunc)(const X509_EXTENSION * const *a, const X509_EXTENSION *const *b); typedef void (*sk_X509_EXTENSION_freefunc)(X509_EXTENSION *a); typedef X509_EXTENSION * (*sk_X509_EXTENSION_copyfunc)(const X509_EXTENSION *a); static __attribute__((unused)) inline X509_EXTENSION *ossl_check_X509_EXTENSION_type(X509_EXTENSION *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_EXTENSION_sk_type(const struct stack_st_X509_EXTENSION *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_EXTENSION_sk_type(struct stack_st_X509_EXTENSION *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_EXTENSION_compfunc_type(sk_X509_EXTENSION_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_EXTENSION_copyfunc_type(sk_X509_EXTENSION_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_EXTENSION_freefunc_type(sk_X509_EXTENSION_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12038   # 253 "include/openssl/x509.h"
12039   typedef struct stack_st_X509_EXTENSION X509_EXTENSIONS;
12040   typedef struct x509_attributes_st X509_ATTRIBUTE;
12041   struct stack_st_X509_ATTRIBUTE; typedef int (*sk_X509_ATTRIBUTE_compfunc)(const X509_ATTRIBUTE * const *a, const X509_ATTRIBUTE *const *b); typedef void (*sk_X509_ATTRIBUTE_freefunc)(X509_ATTRIBUTE *a); typedef X509_ATTRIBUTE * (*sk_X509_ATTRIBUTE_copyfunc)(const X509_ATTRIBUTE *a); static __attribute__((unused)) inline X509_ATTRIBUTE *ossl_check_X509_ATTRIBUTE_type(X509_ATTRIBUTE *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_ATTRIBUTE_sk_type(const struct stack_st_X509_ATTRIBUTE *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_ATTRIBUTE_sk_type(struct stack_st_X509_ATTRIBUTE *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_ATTRIBUTE_compfunc_type(sk_X509_ATTRIBUTE_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_ATTRIBUTE_copyfunc_type(sk_X509_ATTRIBUTE_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_ATTRIBUTE_freefunc_type(sk_X509_ATTRIBUTE_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12042   # 282 "include/openssl/x509.h"
12043   typedef struct X509_req_info_st X509_REQ_INFO;
12044   typedef struct X509_req_st X509_REQ;
12045   typedef struct x509_cert_aux_st X509_CERT_AUX;
12046   typedef struct x509_cinf_st X509_CINF;
12047   # 365 "include/openssl/x509.h"
12048   typedef struct X509_crl_info_st X509_CRL_INFO;
12049   
12050   typedef struct private_key_st {
12051       int version;
12052   
12053       X509_ALGOR *enc_algor;
12054       ASN1_OCTET_STRING *enc_pkey;
12055   
12056       EVP_PKEY *dec_pkey;
12057   
12058       int key_length;
12059       char *key_data;
12060       int key_free;
12061   
12062       EVP_CIPHER_INFO cipher;
12063   } X509_PKEY;
12064   
12065   typedef struct X509_info_st {
12066       X509 *x509;
12067       X509_CRL *crl;
12068       X509_PKEY *x_pkey;
12069       EVP_CIPHER_INFO enc_cipher;
12070       int enc_len;
12071       char *enc_data;
12072   } X509_INFO;
12073   struct stack_st_X509_INFO; typedef int (*sk_X509_INFO_compfunc)(const X509_INFO * const *a, const X509_INFO *const *b); typedef void (*sk_X509_INFO_freefunc)(X509_INFO *a); typedef X509_INFO * (*sk_X509_INFO_copyfunc)(const X509_INFO *a); static __attribute__((unused)) inline X509_INFO *ossl_check_X509_INFO_type(X509_INFO *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_INFO_sk_type(const struct stack_st_X509_INFO *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_INFO_sk_type(struct stack_st_X509_INFO *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_INFO_compfunc_type(sk_X509_INFO_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_INFO_copyfunc_type(sk_X509_INFO_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_INFO_freefunc_type(sk_X509_INFO_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12074   # 422 "include/openssl/x509.h"
12075   typedef struct Netscape_spkac_st {
12076       X509_PUBKEY *pubkey;
12077       ASN1_IA5STRING *challenge;
12078   } NETSCAPE_SPKAC;
12079   
12080   typedef struct Netscape_spki_st {
12081       NETSCAPE_SPKAC *spkac;
12082       X509_ALGOR sig_algor;
12083       ASN1_BIT_STRING *signature;
12084   } NETSCAPE_SPKI;
12085   
12086   
12087   typedef struct Netscape_certificate_sequence {
12088       ASN1_OBJECT *type;
12089       struct stack_st_X509 *certs;
12090   } NETSCAPE_CERT_SEQUENCE;
12091   # 448 "include/openssl/x509.h"
12092   typedef struct PBEPARAM_st {
12093       ASN1_OCTET_STRING *salt;
12094       ASN1_INTEGER *iter;
12095   } PBEPARAM;
12096   
12097   
12098   
12099   typedef struct PBE2PARAM_st {
12100       X509_ALGOR *keyfunc;
12101       X509_ALGOR *encryption;
12102   } PBE2PARAM;
12103   
12104   typedef struct PBKDF2PARAM_st {
12105   
12106       ASN1_TYPE *salt;
12107       ASN1_INTEGER *iter;
12108       ASN1_INTEGER *keylength;
12109       X509_ALGOR *prf;
12110   } PBKDF2PARAM;
12111   
12112   
12113   typedef struct SCRYPT_PARAMS_st {
12114       ASN1_OCTET_STRING *salt;
12115       ASN1_INTEGER *costParameter;
12116       ASN1_INTEGER *blockSize;
12117       ASN1_INTEGER *parallelizationParameter;
12118       ASN1_INTEGER *keyLength;
12119   } SCRYPT_PARAMS;
12120   
12121   
12122   
12123   
12124   
12125   
12126   # 1 "include/openssl/x509_vfy.h" 1
12127   # 17 "include/openssl/x509_vfy.h"
12128           
12129   # 58 "include/openssl/x509_vfy.h"
12130   typedef enum {
12131       X509_LU_NONE = 0,
12132       X509_LU_X509, X509_LU_CRL
12133   } X509_LOOKUP_TYPE;
12134   
12135   
12136   
12137   
12138   
12139   
12140   struct stack_st_X509_LOOKUP; typedef int (*sk_X509_LOOKUP_compfunc)(const X509_LOOKUP * const *a, const X509_LOOKUP *const *b); typedef void (*sk_X509_LOOKUP_freefunc)(X509_LOOKUP *a); typedef X509_LOOKUP * (*sk_X509_LOOKUP_copyfunc)(const X509_LOOKUP *a); static __attribute__((unused)) inline X509_LOOKUP *ossl_check_X509_LOOKUP_type(X509_LOOKUP *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_LOOKUP_sk_type(const struct stack_st_X509_LOOKUP *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_LOOKUP_sk_type(struct stack_st_X509_LOOKUP *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_LOOKUP_compfunc_type(sk_X509_LOOKUP_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_LOOKUP_copyfunc_type(sk_X509_LOOKUP_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_LOOKUP_freefunc_type(sk_X509_LOOKUP_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12141   # 94 "include/openssl/x509_vfy.h"
12142   struct stack_st_X509_OBJECT; typedef int (*sk_X509_OBJECT_compfunc)(const X509_OBJECT * const *a, const X509_OBJECT *const *b); typedef void (*sk_X509_OBJECT_freefunc)(X509_OBJECT *a); typedef X509_OBJECT * (*sk_X509_OBJECT_copyfunc)(const X509_OBJECT *a); static __attribute__((unused)) inline X509_OBJECT *ossl_check_X509_OBJECT_type(X509_OBJECT *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_OBJECT_sk_type(const struct stack_st_X509_OBJECT *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_OBJECT_sk_type(struct stack_st_X509_OBJECT *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_OBJECT_compfunc_type(sk_X509_OBJECT_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_OBJECT_copyfunc_type(sk_X509_OBJECT_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_OBJECT_freefunc_type(sk_X509_OBJECT_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12143   # 120 "include/openssl/x509_vfy.h"
12144   struct stack_st_X509_VERIFY_PARAM; typedef int (*sk_X509_VERIFY_PARAM_compfunc)(const X509_VERIFY_PARAM * const *a, const X509_VERIFY_PARAM *const *b); typedef void (*sk_X509_VERIFY_PARAM_freefunc)(X509_VERIFY_PARAM *a); typedef X509_VERIFY_PARAM * (*sk_X509_VERIFY_PARAM_copyfunc)(const X509_VERIFY_PARAM *a); static __attribute__((unused)) inline X509_VERIFY_PARAM *ossl_check_X509_VERIFY_PARAM_type(X509_VERIFY_PARAM *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_VERIFY_PARAM_sk_type(const struct stack_st_X509_VERIFY_PARAM *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_VERIFY_PARAM_sk_type(struct stack_st_X509_VERIFY_PARAM *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_VERIFY_PARAM_compfunc_type(sk_X509_VERIFY_PARAM_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_VERIFY_PARAM_copyfunc_type(sk_X509_VERIFY_PARAM_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_VERIFY_PARAM_freefunc_type(sk_X509_VERIFY_PARAM_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12145   # 149 "include/openssl/x509_vfy.h"
12146   typedef struct x509_trust_st {
12147       int trust;
12148       int flags;
12149       int (*check_trust) (struct x509_trust_st *, X509 *, int);
12150       char *name;
12151       int arg1;
12152       void *arg2;
12153   } X509_TRUST;
12154   struct stack_st_X509_TRUST; typedef int (*sk_X509_TRUST_compfunc)(const X509_TRUST * const *a, const X509_TRUST *const *b); typedef void (*sk_X509_TRUST_freefunc)(X509_TRUST *a); typedef X509_TRUST * (*sk_X509_TRUST_copyfunc)(const X509_TRUST *a); static __attribute__((unused)) inline X509_TRUST *ossl_check_X509_TRUST_type(X509_TRUST *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_TRUST_sk_type(const struct stack_st_X509_TRUST *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_TRUST_sk_type(struct stack_st_X509_TRUST *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_TRUST_compfunc_type(sk_X509_TRUST_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_TRUST_copyfunc_type(sk_X509_TRUST_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_TRUST_freefunc_type(sk_X509_TRUST_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12155   # 214 "include/openssl/x509_vfy.h"
12156   int X509_TRUST_set(int *t, int trust);
12157   int X509_TRUST_get_count(void);
12158   X509_TRUST *X509_TRUST_get0(int idx);
12159   int X509_TRUST_get_by_id(int id);
12160   int X509_TRUST_add(int id, int flags, int (*ck) (X509_TRUST *, X509 *, int),
12161                      const char *name, int arg1, void *arg2);
12162   void X509_TRUST_cleanup(void);
12163   int X509_TRUST_get_flags(const X509_TRUST *xp);
12164   char *X509_TRUST_get0_name(const X509_TRUST *xp);
12165   int X509_TRUST_get_trust(const X509_TRUST *xp);
12166   
12167   int X509_trusted(const X509 *x);
12168   int X509_add1_trust_object(X509 *x, const ASN1_OBJECT *obj);
12169   int X509_add1_reject_object(X509 *x, const ASN1_OBJECT *obj);
12170   void X509_trust_clear(X509 *x);
12171   void X509_reject_clear(X509 *x);
12172   struct stack_st_ASN1_OBJECT *X509_get0_trust_objects(X509 *x);
12173   struct stack_st_ASN1_OBJECT *X509_get0_reject_objects(X509 *x);
12174   
12175   int (*X509_TRUST_set_default(int (*trust) (int, X509 *, int))) (int, X509 *,
12176                                                                   int);
12177   int X509_check_trust(X509 *x, int id, int flags);
12178   
12179   int X509_verify_cert(X509_STORE_CTX *ctx);
12180   int X509_STORE_CTX_verify(X509_STORE_CTX *ctx);
12181   struct stack_st_X509 *X509_build_chain(X509 *target, struct stack_st_X509 *certs,
12182                                    X509_STORE *store, int with_self_signed,
12183                                    OSSL_LIB_CTX *libctx, const char *propq);
12184   
12185   int X509_STORE_set_depth(X509_STORE *store, int depth);
12186   
12187   typedef int (*X509_STORE_CTX_verify_cb)(int, X509_STORE_CTX *);
12188   int X509_STORE_CTX_print_verify_cb(int ok, X509_STORE_CTX *ctx);
12189   typedef int (*X509_STORE_CTX_verify_fn)(X509_STORE_CTX *);
12190   typedef int (*X509_STORE_CTX_get_issuer_fn)(X509 **issuer,
12191                                               X509_STORE_CTX *ctx, X509 *x);
12192   typedef int (*X509_STORE_CTX_check_issued_fn)(X509_STORE_CTX *ctx,
12193                                                 X509 *x, X509 *issuer);
12194   typedef int (*X509_STORE_CTX_check_revocation_fn)(X509_STORE_CTX *ctx);
12195   typedef int (*X509_STORE_CTX_get_crl_fn)(X509_STORE_CTX *ctx,
12196                                            X509_CRL **crl, X509 *x);
12197   typedef int (*X509_STORE_CTX_check_crl_fn)(X509_STORE_CTX *ctx, X509_CRL *crl);
12198   typedef int (*X509_STORE_CTX_cert_crl_fn)(X509_STORE_CTX *ctx,
12199                                             X509_CRL *crl, X509 *x);
12200   typedef int (*X509_STORE_CTX_check_policy_fn)(X509_STORE_CTX *ctx);
12201   typedef struct stack_st_X509
12202       *(*X509_STORE_CTX_lookup_certs_fn)(X509_STORE_CTX *ctx,
12203                                          const X509_NAME *nm);
12204   typedef struct stack_st_X509_CRL
12205       *(*X509_STORE_CTX_lookup_crls_fn)(const X509_STORE_CTX *ctx,
12206                                         const X509_NAME *nm);
12207   typedef int (*X509_STORE_CTX_cleanup_fn)(X509_STORE_CTX *ctx);
12208   
12209   void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth);
12210   # 479 "include/openssl/x509_vfy.h"
12211   int X509_OBJECT_idx_by_subject(struct stack_st_X509_OBJECT *h, X509_LOOKUP_TYPE type,
12212                                  const X509_NAME *name);
12213   X509_OBJECT *X509_OBJECT_retrieve_by_subject(struct stack_st_X509_OBJECT *h,
12214                                                X509_LOOKUP_TYPE type,
12215                                                const X509_NAME *name);
12216   X509_OBJECT *X509_OBJECT_retrieve_match(struct stack_st_X509_OBJECT *h,
12217                                           X509_OBJECT *x);
12218   int X509_OBJECT_up_ref_count(X509_OBJECT *a);
12219   X509_OBJECT *X509_OBJECT_new(void);
12220   void X509_OBJECT_free(X509_OBJECT *a);
12221   X509_LOOKUP_TYPE X509_OBJECT_get_type(const X509_OBJECT *a);
12222   X509 *X509_OBJECT_get0_X509(const X509_OBJECT *a);
12223   int X509_OBJECT_set1_X509(X509_OBJECT *a, X509 *obj);
12224   X509_CRL *X509_OBJECT_get0_X509_CRL(const X509_OBJECT *a);
12225   int X509_OBJECT_set1_X509_CRL(X509_OBJECT *a, X509_CRL *obj);
12226   X509_STORE *X509_STORE_new(void);
12227   void X509_STORE_free(X509_STORE *xs);
12228   int X509_STORE_lock(X509_STORE *xs);
12229   int X509_STORE_unlock(X509_STORE *xs);
12230   int X509_STORE_up_ref(X509_STORE *xs);
12231   struct stack_st_X509_OBJECT *X509_STORE_get0_objects(const X509_STORE *xs);
12232   struct stack_st_X509_OBJECT *X509_STORE_get1_objects(X509_STORE *xs);
12233   struct stack_st_X509 *X509_STORE_get1_all_certs(X509_STORE *xs);
12234   struct stack_st_X509 *X509_STORE_CTX_get1_certs(X509_STORE_CTX *xs,
12235                                             const X509_NAME *nm);
12236   struct stack_st_X509_CRL *X509_STORE_CTX_get1_crls(const X509_STORE_CTX *st,
12237                                                const X509_NAME *nm);
12238   int X509_STORE_set_flags(X509_STORE *xs, unsigned long flags);
12239   int X509_STORE_set_purpose(X509_STORE *xs, int purpose);
12240   int X509_STORE_set_trust(X509_STORE *xs, int trust);
12241   int X509_STORE_set1_param(X509_STORE *xs, const X509_VERIFY_PARAM *pm);
12242   X509_VERIFY_PARAM *X509_STORE_get0_param(const X509_STORE *xs);
12243   
12244   void X509_STORE_set_verify(X509_STORE *xs, X509_STORE_CTX_verify_fn verify);
12245   
12246   
12247   void X509_STORE_CTX_set_verify(X509_STORE_CTX *ctx,
12248                                  X509_STORE_CTX_verify_fn verify);
12249   X509_STORE_CTX_verify_fn X509_STORE_get_verify(const X509_STORE *xs);
12250   void X509_STORE_set_verify_cb(X509_STORE *xs,
12251                                 X509_STORE_CTX_verify_cb verify_cb);
12252   
12253   
12254   X509_STORE_CTX_verify_cb X509_STORE_get_verify_cb(const X509_STORE *xs);
12255   void X509_STORE_set_get_issuer(X509_STORE *xs,
12256                                  X509_STORE_CTX_get_issuer_fn get_issuer);
12257   X509_STORE_CTX_get_issuer_fn X509_STORE_get_get_issuer(const X509_STORE *xs);
12258   void X509_STORE_set_check_issued(X509_STORE *xs,
12259                                    X509_STORE_CTX_check_issued_fn check_issued);
12260   X509_STORE_CTX_check_issued_fn X509_STORE_get_check_issued(const X509_STORE *s);
12261   void X509_STORE_set_check_revocation(X509_STORE *xs,
12262                                        X509_STORE_CTX_check_revocation_fn check_revocation);
12263   X509_STORE_CTX_check_revocation_fn
12264       X509_STORE_get_check_revocation(const X509_STORE *xs);
12265   void X509_STORE_set_get_crl(X509_STORE *xs,
12266                               X509_STORE_CTX_get_crl_fn get_crl);
12267   X509_STORE_CTX_get_crl_fn X509_STORE_get_get_crl(const X509_STORE *xs);
12268   void X509_STORE_set_check_crl(X509_STORE *xs,
12269                                 X509_STORE_CTX_check_crl_fn check_crl);
12270   X509_STORE_CTX_check_crl_fn X509_STORE_get_check_crl(const X509_STORE *xs);
12271   void X509_STORE_set_cert_crl(X509_STORE *xs,
12272                                X509_STORE_CTX_cert_crl_fn cert_crl);
12273   X509_STORE_CTX_cert_crl_fn X509_STORE_get_cert_crl(const X509_STORE *xs);
12274   void X509_STORE_set_check_policy(X509_STORE *xs,
12275                                    X509_STORE_CTX_check_policy_fn check_policy);
12276   X509_STORE_CTX_check_policy_fn X509_STORE_get_check_policy(const X509_STORE *s);
12277   void X509_STORE_set_lookup_certs(X509_STORE *xs,
12278                                    X509_STORE_CTX_lookup_certs_fn lookup_certs);
12279   X509_STORE_CTX_lookup_certs_fn X509_STORE_get_lookup_certs(const X509_STORE *s);
12280   void X509_STORE_set_lookup_crls(X509_STORE *xs,
12281                                   X509_STORE_CTX_lookup_crls_fn lookup_crls);
12282   
12283   
12284   X509_STORE_CTX_lookup_crls_fn X509_STORE_get_lookup_crls(const X509_STORE *xs);
12285   void X509_STORE_set_cleanup(X509_STORE *xs,
12286                               X509_STORE_CTX_cleanup_fn cleanup);
12287   X509_STORE_CTX_cleanup_fn X509_STORE_get_cleanup(const X509_STORE *xs);
12288   
12289   
12290   
12291   int X509_STORE_set_ex_data(X509_STORE *xs, int idx, void *data);
12292   void *X509_STORE_get_ex_data(const X509_STORE *xs, int idx);
12293   
12294   X509_STORE_CTX *X509_STORE_CTX_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
12295   X509_STORE_CTX *X509_STORE_CTX_new(void);
12296   
12297   int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
12298   
12299   void X509_STORE_CTX_free(X509_STORE_CTX *ctx);
12300   int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *trust_store,
12301                           X509 *target, struct stack_st_X509 *untrusted);
12302   int X509_STORE_CTX_init_rpk(X509_STORE_CTX *ctx, X509_STORE *trust_store,
12303                               EVP_PKEY* rpk);
12304   void X509_STORE_CTX_set0_trusted_stack(X509_STORE_CTX *ctx, struct stack_st_X509 *sk);
12305   void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx);
12306   
12307   X509_STORE *X509_STORE_CTX_get0_store(const X509_STORE_CTX *ctx);
12308   X509 *X509_STORE_CTX_get0_cert(const X509_STORE_CTX *ctx);
12309   EVP_PKEY *X509_STORE_CTX_get0_rpk(const X509_STORE_CTX *ctx);
12310   struct stack_st_X509* X509_STORE_CTX_get0_untrusted(const X509_STORE_CTX *ctx);
12311   void X509_STORE_CTX_set0_untrusted(X509_STORE_CTX *ctx, struct stack_st_X509 *sk);
12312   void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,
12313                                     X509_STORE_CTX_verify_cb verify);
12314   X509_STORE_CTX_verify_cb X509_STORE_CTX_get_verify_cb(const X509_STORE_CTX *ctx);
12315   X509_STORE_CTX_verify_fn X509_STORE_CTX_get_verify(const X509_STORE_CTX *ctx);
12316   X509_STORE_CTX_get_issuer_fn X509_STORE_CTX_get_get_issuer(const X509_STORE_CTX *ctx);
12317   X509_STORE_CTX_check_issued_fn X509_STORE_CTX_get_check_issued(const X509_STORE_CTX *ctx);
12318   X509_STORE_CTX_check_revocation_fn X509_STORE_CTX_get_check_revocation(const X509_STORE_CTX *ctx);
12319   void X509_STORE_CTX_set_get_crl(X509_STORE_CTX *ctx,
12320                                   X509_STORE_CTX_get_crl_fn get_crl);
12321   X509_STORE_CTX_get_crl_fn X509_STORE_CTX_get_get_crl(const X509_STORE_CTX *ctx);
12322   X509_STORE_CTX_check_crl_fn X509_STORE_CTX_get_check_crl(const X509_STORE_CTX *ctx);
12323   X509_STORE_CTX_cert_crl_fn X509_STORE_CTX_get_cert_crl(const X509_STORE_CTX *ctx);
12324   X509_STORE_CTX_check_policy_fn X509_STORE_CTX_get_check_policy(const X509_STORE_CTX *ctx);
12325   X509_STORE_CTX_lookup_certs_fn X509_STORE_CTX_get_lookup_certs(const X509_STORE_CTX *ctx);
12326   X509_STORE_CTX_lookup_crls_fn X509_STORE_CTX_get_lookup_crls(const X509_STORE_CTX *ctx);
12327   X509_STORE_CTX_cleanup_fn X509_STORE_CTX_get_cleanup(const X509_STORE_CTX *ctx);
12328   # 610 "include/openssl/x509_vfy.h"
12329   X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *xs, X509_LOOKUP_METHOD *m);
12330   X509_LOOKUP_METHOD *X509_LOOKUP_hash_dir(void);
12331   X509_LOOKUP_METHOD *X509_LOOKUP_file(void);
12332   X509_LOOKUP_METHOD *X509_LOOKUP_store(void);
12333   
12334   typedef int (*X509_LOOKUP_ctrl_fn)(X509_LOOKUP *ctx, int cmd, const char *argc,
12335                                      long argl, char **ret);
12336   typedef int (*X509_LOOKUP_ctrl_ex_fn)(
12337       X509_LOOKUP *ctx, int cmd, const char *argc, long argl, char **ret,
12338       OSSL_LIB_CTX *libctx, const char *propq);
12339   
12340   typedef int (*X509_LOOKUP_get_by_subject_fn)(X509_LOOKUP *ctx,
12341                                                X509_LOOKUP_TYPE type,
12342                                                const X509_NAME *name,
12343                                                X509_OBJECT *ret);
12344   typedef int (*X509_LOOKUP_get_by_subject_ex_fn)(X509_LOOKUP *ctx,
12345                                                            X509_LOOKUP_TYPE type,
12346                                                            const X509_NAME *name,
12347                                                            X509_OBJECT *ret,
12348                                                            OSSL_LIB_CTX *libctx,
12349                                                            const char *propq);
12350   typedef int (*X509_LOOKUP_get_by_issuer_serial_fn)(X509_LOOKUP *ctx,
12351                                                      X509_LOOKUP_TYPE type,
12352                                                      const X509_NAME *name,
12353                                                      const ASN1_INTEGER *serial,
12354                                                      X509_OBJECT *ret);
12355   typedef int (*X509_LOOKUP_get_by_fingerprint_fn)(X509_LOOKUP *ctx,
12356                                                    X509_LOOKUP_TYPE type,
12357                                                    const unsigned char* bytes,
12358                                                    int len,
12359                                                    X509_OBJECT *ret);
12360   typedef int (*X509_LOOKUP_get_by_alias_fn)(X509_LOOKUP *ctx,
12361                                              X509_LOOKUP_TYPE type,
12362                                              const char *str,
12363                                              int len,
12364                                              X509_OBJECT *ret);
12365   
12366   X509_LOOKUP_METHOD *X509_LOOKUP_meth_new(const char *name);
12367   void X509_LOOKUP_meth_free(X509_LOOKUP_METHOD *method);
12368   
12369   int X509_LOOKUP_meth_set_new_item(X509_LOOKUP_METHOD *method,
12370                                     int (*new_item) (X509_LOOKUP *ctx));
12371   int (*X509_LOOKUP_meth_get_new_item(const X509_LOOKUP_METHOD* method))
12372       (X509_LOOKUP *ctx);
12373   
12374   int X509_LOOKUP_meth_set_free(X509_LOOKUP_METHOD *method,
12375                                 void (*free_fn) (X509_LOOKUP *ctx));
12376   void (*X509_LOOKUP_meth_get_free(const X509_LOOKUP_METHOD* method))
12377       (X509_LOOKUP *ctx);
12378   
12379   int X509_LOOKUP_meth_set_init(X509_LOOKUP_METHOD *method,
12380                                 int (*init) (X509_LOOKUP *ctx));
12381   int (*X509_LOOKUP_meth_get_init(const X509_LOOKUP_METHOD* method))
12382       (X509_LOOKUP *ctx);
12383   
12384   int X509_LOOKUP_meth_set_shutdown(X509_LOOKUP_METHOD *method,
12385                                     int (*shutdown) (X509_LOOKUP *ctx));
12386   int (*X509_LOOKUP_meth_get_shutdown(const X509_LOOKUP_METHOD* method))
12387       (X509_LOOKUP *ctx);
12388   
12389   int X509_LOOKUP_meth_set_ctrl(X509_LOOKUP_METHOD *method,
12390                                 X509_LOOKUP_ctrl_fn ctrl_fn);
12391   X509_LOOKUP_ctrl_fn X509_LOOKUP_meth_get_ctrl(const X509_LOOKUP_METHOD *method);
12392   
12393   int X509_LOOKUP_meth_set_get_by_subject(X509_LOOKUP_METHOD *method,
12394                                           X509_LOOKUP_get_by_subject_fn fn);
12395   X509_LOOKUP_get_by_subject_fn X509_LOOKUP_meth_get_get_by_subject(
12396       const X509_LOOKUP_METHOD *method);
12397   
12398   int X509_LOOKUP_meth_set_get_by_issuer_serial(X509_LOOKUP_METHOD *method,
12399       X509_LOOKUP_get_by_issuer_serial_fn fn);
12400   X509_LOOKUP_get_by_issuer_serial_fn X509_LOOKUP_meth_get_get_by_issuer_serial(
12401       const X509_LOOKUP_METHOD *method);
12402   
12403   int X509_LOOKUP_meth_set_get_by_fingerprint(X509_LOOKUP_METHOD *method,
12404       X509_LOOKUP_get_by_fingerprint_fn fn);
12405   X509_LOOKUP_get_by_fingerprint_fn X509_LOOKUP_meth_get_get_by_fingerprint(
12406       const X509_LOOKUP_METHOD *method);
12407   
12408   int X509_LOOKUP_meth_set_get_by_alias(X509_LOOKUP_METHOD *method,
12409                                         X509_LOOKUP_get_by_alias_fn fn);
12410   X509_LOOKUP_get_by_alias_fn X509_LOOKUP_meth_get_get_by_alias(
12411       const X509_LOOKUP_METHOD *method);
12412   
12413   
12414   int X509_STORE_add_cert(X509_STORE *xs, X509 *x);
12415   int X509_STORE_add_crl(X509_STORE *xs, X509_CRL *x);
12416   
12417   int X509_STORE_CTX_get_by_subject(const X509_STORE_CTX *vs,
12418                                     X509_LOOKUP_TYPE type,
12419                                     const X509_NAME *name, X509_OBJECT *ret);
12420   X509_OBJECT *X509_STORE_CTX_get_obj_by_subject(X509_STORE_CTX *vs,
12421                                                  X509_LOOKUP_TYPE type,
12422                                                  const X509_NAME *name);
12423   
12424   int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
12425                        long argl, char **ret);
12426   int X509_LOOKUP_ctrl_ex(X509_LOOKUP *ctx, int cmd, const char *argc, long argl,
12427                           char **ret, OSSL_LIB_CTX *libctx, const char *propq);
12428   
12429   int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type);
12430   int X509_load_cert_file_ex(X509_LOOKUP *ctx, const char *file, int type,
12431                              OSSL_LIB_CTX *libctx, const char *propq);
12432   int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type);
12433   int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type);
12434   int X509_load_cert_crl_file_ex(X509_LOOKUP *ctx, const char *file, int type,
12435                                  OSSL_LIB_CTX *libctx, const char *propq);
12436   
12437   X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method);
12438   void X509_LOOKUP_free(X509_LOOKUP *ctx);
12439   int X509_LOOKUP_init(X509_LOOKUP *ctx);
12440   int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
12441                              const X509_NAME *name, X509_OBJECT *ret);
12442   int X509_LOOKUP_by_subject_ex(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
12443                                 const X509_NAME *name, X509_OBJECT *ret,
12444                                 OSSL_LIB_CTX *libctx, const char *propq);
12445   int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
12446                                    const X509_NAME *name,
12447                                    const ASN1_INTEGER *serial,
12448                                    X509_OBJECT *ret);
12449   int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
12450                                  const unsigned char *bytes, int len,
12451                                  X509_OBJECT *ret);
12452   int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
12453                            const char *str, int len, X509_OBJECT *ret);
12454   int X509_LOOKUP_set_method_data(X509_LOOKUP *ctx, void *data);
12455   void *X509_LOOKUP_get_method_data(const X509_LOOKUP *ctx);
12456   X509_STORE *X509_LOOKUP_get_store(const X509_LOOKUP *ctx);
12457   int X509_LOOKUP_shutdown(X509_LOOKUP *ctx);
12458   
12459   int X509_STORE_load_file(X509_STORE *xs, const char *file);
12460   int X509_STORE_load_path(X509_STORE *xs, const char *path);
12461   int X509_STORE_load_store(X509_STORE *xs, const char *store);
12462   int X509_STORE_load_locations(X509_STORE *s, const char *file, const char *dir);
12463   int X509_STORE_set_default_paths(X509_STORE *xs);
12464   
12465   int X509_STORE_load_file_ex(X509_STORE *xs, const char *file,
12466                               OSSL_LIB_CTX *libctx, const char *propq);
12467   int X509_STORE_load_store_ex(X509_STORE *xs, const char *store,
12468                                OSSL_LIB_CTX *libctx, const char *propq);
12469   int X509_STORE_load_locations_ex(X509_STORE *xs,
12470                                    const char *file, const char *dir,
12471                                    OSSL_LIB_CTX *libctx, const char *propq);
12472   int X509_STORE_set_default_paths_ex(X509_STORE *xs,
12473                                       OSSL_LIB_CTX *libctx, const char *propq);
12474   
12475   
12476   
12477   int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data);
12478   void *X509_STORE_CTX_get_ex_data(const X509_STORE_CTX *ctx, int idx);
12479   int X509_STORE_CTX_get_error(const X509_STORE_CTX *ctx);
12480   void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int s);
12481   int X509_STORE_CTX_get_error_depth(const X509_STORE_CTX *ctx);
12482   void X509_STORE_CTX_set_error_depth(X509_STORE_CTX *ctx, int depth);
12483   X509 *X509_STORE_CTX_get_current_cert(const X509_STORE_CTX *ctx);
12484   void X509_STORE_CTX_set_current_cert(X509_STORE_CTX *ctx, X509 *x);
12485   X509 *X509_STORE_CTX_get0_current_issuer(const X509_STORE_CTX *ctx);
12486   X509_CRL *X509_STORE_CTX_get0_current_crl(const X509_STORE_CTX *ctx);
12487   X509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(const X509_STORE_CTX *ctx);
12488   struct stack_st_X509 *X509_STORE_CTX_get0_chain(const X509_STORE_CTX *ctx);
12489   struct stack_st_X509 *X509_STORE_CTX_get1_chain(const X509_STORE_CTX *ctx);
12490   void X509_STORE_CTX_set_cert(X509_STORE_CTX *ctx, X509 *target);
12491   void X509_STORE_CTX_set0_rpk(X509_STORE_CTX *ctx, EVP_PKEY *target);
12492   void X509_STORE_CTX_set0_verified_chain(X509_STORE_CTX *c, struct stack_st_X509 *sk);
12493   void X509_STORE_CTX_set0_crls(X509_STORE_CTX *ctx, struct stack_st_X509_CRL *sk);
12494   int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose);
12495   int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust);
12496   int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose,
12497                                      int purpose, int trust);
12498   void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags);
12499   void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags,
12500                                time_t t);
12501   void X509_STORE_CTX_set_current_reasons(X509_STORE_CTX *ctx,
12502                                           unsigned int current_reasons);
12503   
12504   X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(const X509_STORE_CTX *ctx);
12505   int X509_STORE_CTX_get_explicit_policy(const X509_STORE_CTX *ctx);
12506   int X509_STORE_CTX_get_num_untrusted(const X509_STORE_CTX *ctx);
12507   
12508   X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(const X509_STORE_CTX *ctx);
12509   void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param);
12510   int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name);
12511   
12512   
12513   
12514   
12515   
12516   void X509_STORE_CTX_set0_dane(X509_STORE_CTX *ctx, SSL_DANE *dane);
12517   
12518   
12519   
12520   
12521   X509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void);
12522   void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param);
12523   int X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *to,
12524                                 const X509_VERIFY_PARAM *from);
12525   int X509_VERIFY_PARAM_set1(X509_VERIFY_PARAM *to,
12526                              const X509_VERIFY_PARAM *from);
12527   int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name);
12528   int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param,
12529                                   unsigned long flags);
12530   int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param,
12531                                     unsigned long flags);
12532   unsigned long X509_VERIFY_PARAM_get_flags(const X509_VERIFY_PARAM *param);
12533   int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose);
12534   int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust);
12535   void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth);
12536   void X509_VERIFY_PARAM_set_auth_level(X509_VERIFY_PARAM *param, int auth_level);
12537   time_t X509_VERIFY_PARAM_get_time(const X509_VERIFY_PARAM *param);
12538   void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t);
12539   int X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param,
12540                                     ASN1_OBJECT *policy);
12541   int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param,
12542                                       struct stack_st_ASN1_OBJECT *policies);
12543   
12544   int X509_VERIFY_PARAM_set_inh_flags(X509_VERIFY_PARAM *param,
12545                                       uint32_t flags);
12546   uint32_t X509_VERIFY_PARAM_get_inh_flags(const X509_VERIFY_PARAM *param);
12547   
12548   char *X509_VERIFY_PARAM_get0_host(X509_VERIFY_PARAM *param, int idx);
12549   int X509_VERIFY_PARAM_set1_host(X509_VERIFY_PARAM *param,
12550                                   const char *name, size_t namelen);
12551   int X509_VERIFY_PARAM_add1_host(X509_VERIFY_PARAM *param,
12552                                   const char *name, size_t namelen);
12553   void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param,
12554                                        unsigned int flags);
12555   unsigned int X509_VERIFY_PARAM_get_hostflags(const X509_VERIFY_PARAM *param);
12556   char *X509_VERIFY_PARAM_get0_peername(const X509_VERIFY_PARAM *param);
12557   void X509_VERIFY_PARAM_move_peername(X509_VERIFY_PARAM *, X509_VERIFY_PARAM *);
12558   char *X509_VERIFY_PARAM_get0_email(X509_VERIFY_PARAM *param);
12559   int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param,
12560                                    const char *email, size_t emaillen);
12561   char *X509_VERIFY_PARAM_get1_ip_asc(X509_VERIFY_PARAM *param);
12562   int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param,
12563                                 const unsigned char *ip, size_t iplen);
12564   int X509_VERIFY_PARAM_set1_ip_asc(X509_VERIFY_PARAM *param,
12565                                     const char *ipasc);
12566   
12567   int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param);
12568   int X509_VERIFY_PARAM_get_auth_level(const X509_VERIFY_PARAM *param);
12569   const char *X509_VERIFY_PARAM_get0_name(const X509_VERIFY_PARAM *param);
12570   
12571   int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param);
12572   int X509_VERIFY_PARAM_get_count(void);
12573   const X509_VERIFY_PARAM *X509_VERIFY_PARAM_get0(int id);
12574   const X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name);
12575   void X509_VERIFY_PARAM_table_cleanup(void);
12576   # 871 "include/openssl/x509_vfy.h"
12577   int X509_policy_check(X509_POLICY_TREE **ptree, int *pexplicit_policy,
12578                         struct stack_st_X509 *certs,
12579                         struct stack_st_ASN1_OBJECT *policy_oids, unsigned int flags);
12580   
12581   void X509_policy_tree_free(X509_POLICY_TREE *tree);
12582   
12583   int X509_policy_tree_level_count(const X509_POLICY_TREE *tree);
12584   X509_POLICY_LEVEL *X509_policy_tree_get0_level(const X509_POLICY_TREE *tree,
12585                                                  int i);
12586   
12587   struct stack_st_X509_POLICY_NODE
12588       *X509_policy_tree_get0_policies(const X509_POLICY_TREE *tree);
12589   
12590   struct stack_st_X509_POLICY_NODE
12591       *X509_policy_tree_get0_user_policies(const X509_POLICY_TREE *tree);
12592   
12593   int X509_policy_level_node_count(X509_POLICY_LEVEL *level);
12594   
12595   X509_POLICY_NODE *X509_policy_level_get0_node(const X509_POLICY_LEVEL *level,
12596                                                 int i);
12597   
12598   const ASN1_OBJECT *X509_policy_node_get0_policy(const X509_POLICY_NODE *node);
12599   
12600   struct stack_st_POLICYQUALINFO
12601       *X509_policy_node_get0_qualifiers(const X509_POLICY_NODE *node);
12602   const X509_POLICY_NODE
12603       *X509_policy_node_get0_parent(const X509_POLICY_NODE *node);
12604   # 483 "include/openssl/x509.h" 2
12605   # 1 "include/openssl/pkcs7.h" 1
12606   # 17 "include/openssl/pkcs7.h"
12607           
12608   # 29 "include/openssl/pkcs7.h"
12609   # 1 "include/openssl/types.h" 1
12610   # 30 "include/openssl/pkcs7.h" 2
12611   # 1 "include/openssl/pkcs7err.h" 1
12612   # 13 "include/openssl/pkcs7err.h"
12613           
12614   # 31 "include/openssl/pkcs7.h" 2
12615   # 47 "include/openssl/pkcs7.h"
12616   typedef struct PKCS7_CTX_st {
12617       OSSL_LIB_CTX *libctx;
12618       char *propq;
12619   } PKCS7_CTX;
12620   
12621   typedef struct pkcs7_issuer_and_serial_st {
12622       X509_NAME *issuer;
12623       ASN1_INTEGER *serial;
12624   } PKCS7_ISSUER_AND_SERIAL;
12625   
12626   typedef struct pkcs7_signer_info_st {
12627       ASN1_INTEGER *version;
12628       PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
12629       X509_ALGOR *digest_alg;
12630       struct stack_st_X509_ATTRIBUTE *auth_attr;
12631       X509_ALGOR *digest_enc_alg;
12632       ASN1_OCTET_STRING *enc_digest;
12633       struct stack_st_X509_ATTRIBUTE *unauth_attr;
12634   
12635       EVP_PKEY *pkey;
12636       const PKCS7_CTX *ctx;
12637   } PKCS7_SIGNER_INFO;
12638   struct stack_st_PKCS7_SIGNER_INFO; typedef int (*sk_PKCS7_SIGNER_INFO_compfunc)(const PKCS7_SIGNER_INFO * const *a, const PKCS7_SIGNER_INFO *const *b); typedef void (*sk_PKCS7_SIGNER_INFO_freefunc)(PKCS7_SIGNER_INFO *a); typedef PKCS7_SIGNER_INFO * (*sk_PKCS7_SIGNER_INFO_copyfunc)(const PKCS7_SIGNER_INFO *a); static __attribute__((unused)) inline PKCS7_SIGNER_INFO *ossl_check_PKCS7_SIGNER_INFO_type(PKCS7_SIGNER_INFO *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_PKCS7_SIGNER_INFO_sk_type(const struct stack_st_PKCS7_SIGNER_INFO *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_PKCS7_SIGNER_INFO_sk_type(struct stack_st_PKCS7_SIGNER_INFO *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_PKCS7_SIGNER_INFO_compfunc_type(sk_PKCS7_SIGNER_INFO_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_PKCS7_SIGNER_INFO_copyfunc_type(sk_PKCS7_SIGNER_INFO_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_PKCS7_SIGNER_INFO_freefunc_type(sk_PKCS7_SIGNER_INFO_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12639   # 97 "include/openssl/pkcs7.h"
12640   typedef struct pkcs7_recip_info_st {
12641       ASN1_INTEGER *version;
12642       PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
12643       X509_ALGOR *key_enc_algor;
12644       ASN1_OCTET_STRING *enc_key;
12645       X509 *cert;
12646       const PKCS7_CTX *ctx;
12647   } PKCS7_RECIP_INFO;
12648   struct stack_st_PKCS7_RECIP_INFO; typedef int (*sk_PKCS7_RECIP_INFO_compfunc)(const PKCS7_RECIP_INFO * const *a, const PKCS7_RECIP_INFO *const *b); typedef void (*sk_PKCS7_RECIP_INFO_freefunc)(PKCS7_RECIP_INFO *a); typedef PKCS7_RECIP_INFO * (*sk_PKCS7_RECIP_INFO_copyfunc)(const PKCS7_RECIP_INFO *a); static __attribute__((unused)) inline PKCS7_RECIP_INFO *ossl_check_PKCS7_RECIP_INFO_type(PKCS7_RECIP_INFO *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_PKCS7_RECIP_INFO_sk_type(const struct stack_st_PKCS7_RECIP_INFO *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_PKCS7_RECIP_INFO_sk_type(struct stack_st_PKCS7_RECIP_INFO *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_PKCS7_RECIP_INFO_compfunc_type(sk_PKCS7_RECIP_INFO_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_PKCS7_RECIP_INFO_copyfunc_type(sk_PKCS7_RECIP_INFO_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_PKCS7_RECIP_INFO_freefunc_type(sk_PKCS7_RECIP_INFO_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12649   # 134 "include/openssl/pkcs7.h"
12650   typedef struct pkcs7_signed_st {
12651       ASN1_INTEGER *version;
12652       struct stack_st_X509_ALGOR *md_algs;
12653       struct stack_st_X509 *cert;
12654       struct stack_st_X509_CRL *crl;
12655       struct stack_st_PKCS7_SIGNER_INFO *signer_info;
12656       struct pkcs7_st *contents;
12657   } PKCS7_SIGNED;
12658   
12659   
12660   
12661   
12662   
12663   typedef struct pkcs7_enc_content_st {
12664       ASN1_OBJECT *content_type;
12665       X509_ALGOR *algorithm;
12666       ASN1_OCTET_STRING *enc_data;
12667       const EVP_CIPHER *cipher;
12668       const PKCS7_CTX *ctx;
12669   } PKCS7_ENC_CONTENT;
12670   
12671   typedef struct pkcs7_enveloped_st {
12672       ASN1_INTEGER *version;
12673       struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
12674       PKCS7_ENC_CONTENT *enc_data;
12675   } PKCS7_ENVELOPE;
12676   
12677   typedef struct pkcs7_signedandenveloped_st {
12678       ASN1_INTEGER *version;
12679       struct stack_st_X509_ALGOR *md_algs;
12680       struct stack_st_X509 *cert;
12681       struct stack_st_X509_CRL *crl;
12682       struct stack_st_PKCS7_SIGNER_INFO *signer_info;
12683       PKCS7_ENC_CONTENT *enc_data;
12684       struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
12685   } PKCS7_SIGN_ENVELOPE;
12686   
12687   typedef struct pkcs7_digest_st {
12688       ASN1_INTEGER *version;
12689       X509_ALGOR *md;
12690       struct pkcs7_st *contents;
12691       ASN1_OCTET_STRING *digest;
12692   } PKCS7_DIGEST;
12693   
12694   typedef struct pkcs7_encrypted_st {
12695       ASN1_INTEGER *version;
12696       PKCS7_ENC_CONTENT *enc_data;
12697   } PKCS7_ENCRYPT;
12698   
12699   typedef struct pkcs7_st {
12700   
12701   
12702   
12703   
12704       unsigned char *asn1;
12705       long length;
12706   
12707   
12708   
12709       int state;
12710       int detached;
12711       ASN1_OBJECT *type;
12712   
12713   
12714   
12715   
12716   
12717       union {
12718           char *ptr;
12719   
12720           ASN1_OCTET_STRING *data;
12721   
12722           PKCS7_SIGNED *sign;
12723   
12724           PKCS7_ENVELOPE *enveloped;
12725   
12726           PKCS7_SIGN_ENVELOPE *signed_and_enveloped;
12727   
12728           PKCS7_DIGEST *digest;
12729   
12730           PKCS7_ENCRYPT *encrypted;
12731   
12732           ASN1_TYPE *other;
12733       } d;
12734       PKCS7_CTX ctx;
12735   } PKCS7;
12736   struct stack_st_PKCS7; typedef int (*sk_PKCS7_compfunc)(const PKCS7 * const *a, const PKCS7 *const *b); typedef void (*sk_PKCS7_freefunc)(PKCS7 *a); typedef PKCS7 * (*sk_PKCS7_copyfunc)(const PKCS7 *a); static __attribute__((unused)) inline PKCS7 *ossl_check_PKCS7_type(PKCS7 *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_PKCS7_sk_type(const struct stack_st_PKCS7 *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_PKCS7_sk_type(struct stack_st_PKCS7 *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_PKCS7_compfunc_type(sk_PKCS7_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_PKCS7_copyfunc_type(sk_PKCS7_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_PKCS7_freefunc_type(sk_PKCS7_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12737   # 305 "include/openssl/pkcs7.h"
12738   extern PKCS7_ISSUER_AND_SERIAL *PKCS7_ISSUER_AND_SERIAL_new(void); extern void PKCS7_ISSUER_AND_SERIAL_free(PKCS7_ISSUER_AND_SERIAL *a); extern PKCS7_ISSUER_AND_SERIAL *d2i_PKCS7_ISSUER_AND_SERIAL(PKCS7_ISSUER_AND_SERIAL **a, const unsigned char **in, long len); extern int i2d_PKCS7_ISSUER_AND_SERIAL(const PKCS7_ISSUER_AND_SERIAL *a, unsigned char **out); extern const ASN1_ITEM * PKCS7_ISSUER_AND_SERIAL_it(void);
12739   
12740   int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,
12741                                      const EVP_MD *type, unsigned char *md,
12742                                      unsigned int *len);
12743   
12744   PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7);
12745   int i2d_PKCS7_fp(FILE *fp, const PKCS7 *p7);
12746   
12747   extern PKCS7 *PKCS7_dup(const PKCS7 *a);
12748   PKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7);
12749   int i2d_PKCS7_bio(BIO *bp, const PKCS7 *p7);
12750   int i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
12751   int PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
12752   
12753   extern PKCS7_SIGNER_INFO *PKCS7_SIGNER_INFO_new(void); extern void PKCS7_SIGNER_INFO_free(PKCS7_SIGNER_INFO *a); extern PKCS7_SIGNER_INFO *d2i_PKCS7_SIGNER_INFO(PKCS7_SIGNER_INFO **a, const unsigned char **in, long len); extern int i2d_PKCS7_SIGNER_INFO(const PKCS7_SIGNER_INFO *a, unsigned char **out); extern const ASN1_ITEM * PKCS7_SIGNER_INFO_it(void);
12754   extern PKCS7_RECIP_INFO *PKCS7_RECIP_INFO_new(void); extern void PKCS7_RECIP_INFO_free(PKCS7_RECIP_INFO *a); extern PKCS7_RECIP_INFO *d2i_PKCS7_RECIP_INFO(PKCS7_RECIP_INFO **a, const unsigned char **in, long len); extern int i2d_PKCS7_RECIP_INFO(const PKCS7_RECIP_INFO *a, unsigned char **out); extern const ASN1_ITEM * PKCS7_RECIP_INFO_it(void);
12755   extern PKCS7_SIGNED *PKCS7_SIGNED_new(void); extern void PKCS7_SIGNED_free(PKCS7_SIGNED *a); extern PKCS7_SIGNED *d2i_PKCS7_SIGNED(PKCS7_SIGNED **a, const unsigned char **in, long len); extern int i2d_PKCS7_SIGNED(const PKCS7_SIGNED *a, unsigned char **out); extern const ASN1_ITEM * PKCS7_SIGNED_it(void);
12756   extern PKCS7_ENC_CONTENT *PKCS7_ENC_CONTENT_new(void); extern void PKCS7_ENC_CONTENT_free(PKCS7_ENC_CONTENT *a); extern PKCS7_ENC_CONTENT *d2i_PKCS7_ENC_CONTENT(PKCS7_ENC_CONTENT **a, const unsigned char **in, long len); extern int i2d_PKCS7_ENC_CONTENT(const PKCS7_ENC_CONTENT *a, unsigned char **out); extern const ASN1_ITEM * PKCS7_ENC_CONTENT_it(void);
12757   extern PKCS7_ENVELOPE *PKCS7_ENVELOPE_new(void); extern void PKCS7_ENVELOPE_free(PKCS7_ENVELOPE *a); extern PKCS7_ENVELOPE *d2i_PKCS7_ENVELOPE(PKCS7_ENVELOPE **a, const unsigned char **in, long len); extern int i2d_PKCS7_ENVELOPE(const PKCS7_ENVELOPE *a, unsigned char **out); extern const ASN1_ITEM * PKCS7_ENVELOPE_it(void);
12758   extern PKCS7_SIGN_ENVELOPE *PKCS7_SIGN_ENVELOPE_new(void); extern void PKCS7_SIGN_ENVELOPE_free(PKCS7_SIGN_ENVELOPE *a); extern PKCS7_SIGN_ENVELOPE *d2i_PKCS7_SIGN_ENVELOPE(PKCS7_SIGN_ENVELOPE **a, const unsigned char **in, long len); extern int i2d_PKCS7_SIGN_ENVELOPE(const PKCS7_SIGN_ENVELOPE *a, unsigned char **out); extern const ASN1_ITEM * PKCS7_SIGN_ENVELOPE_it(void);
12759   extern PKCS7_DIGEST *PKCS7_DIGEST_new(void); extern void PKCS7_DIGEST_free(PKCS7_DIGEST *a); extern PKCS7_DIGEST *d2i_PKCS7_DIGEST(PKCS7_DIGEST **a, const unsigned char **in, long len); extern int i2d_PKCS7_DIGEST(const PKCS7_DIGEST *a, unsigned char **out); extern const ASN1_ITEM * PKCS7_DIGEST_it(void);
12760   extern PKCS7_ENCRYPT *PKCS7_ENCRYPT_new(void); extern void PKCS7_ENCRYPT_free(PKCS7_ENCRYPT *a); extern PKCS7_ENCRYPT *d2i_PKCS7_ENCRYPT(PKCS7_ENCRYPT **a, const unsigned char **in, long len); extern int i2d_PKCS7_ENCRYPT(const PKCS7_ENCRYPT *a, unsigned char **out); extern const ASN1_ITEM * PKCS7_ENCRYPT_it(void);
12761   extern PKCS7 *PKCS7_new(void); extern void PKCS7_free(PKCS7 *a); extern PKCS7 *d2i_PKCS7(PKCS7 **a, const unsigned char **in, long len); extern int i2d_PKCS7(const PKCS7 *a, unsigned char **out); extern const ASN1_ITEM * PKCS7_it(void);
12762   PKCS7 *PKCS7_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
12763   
12764   extern const ASN1_ITEM * PKCS7_ATTR_SIGN_it(void);
12765   extern const ASN1_ITEM * PKCS7_ATTR_VERIFY_it(void);
12766   
12767   extern int i2d_PKCS7_NDEF(const PKCS7 *a, unsigned char **out);
12768   extern int PKCS7_print_ctx(BIO *out, const PKCS7 *x, int indent, const ASN1_PCTX *pctx);
12769   
12770   long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg);
12771   
12772   int PKCS7_type_is_other(PKCS7 *p7);
12773   int PKCS7_set_type(PKCS7 *p7, int type);
12774   int PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other);
12775   int PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data);
12776   int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
12777                             const EVP_MD *dgst);
12778   int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si);
12779   int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i);
12780   int PKCS7_add_certificate(PKCS7 *p7, X509 *cert);
12781   int PKCS7_add_crl(PKCS7 *p7, X509_CRL *crl);
12782   int PKCS7_content_new(PKCS7 *p7, int nid);
12783   int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx,
12784                        BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si);
12785   int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si,
12786                             X509 *signer);
12787   
12788   BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio);
12789   int PKCS7_dataFinal(PKCS7 *p7, BIO *bio);
12790   BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert);
12791   
12792   PKCS7_SIGNER_INFO *PKCS7_add_signature(PKCS7 *p7, X509 *x509,
12793                                          EVP_PKEY *pkey, const EVP_MD *dgst);
12794   X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si);
12795   int PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md);
12796   struct stack_st_PKCS7_SIGNER_INFO *PKCS7_get_signer_info(PKCS7 *p7);
12797   
12798   PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509);
12799   void PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk,
12800                                    X509_ALGOR **pdig, X509_ALGOR **psig);
12801   void PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc);
12802   int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri);
12803   int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509);
12804   int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher);
12805   int PKCS7_stream(unsigned char ***boundary, PKCS7 *p7);
12806   
12807   PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx);
12808   ASN1_OCTET_STRING *PKCS7_get_octet_string(PKCS7 *p7);
12809   ASN1_OCTET_STRING *PKCS7_digest_from_attributes(struct stack_st_X509_ATTRIBUTE *sk);
12810   int PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int type,
12811                                  void *data);
12812   int PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,
12813                           void *value);
12814   ASN1_TYPE *PKCS7_get_attribute(const PKCS7_SIGNER_INFO *si, int nid);
12815   ASN1_TYPE *PKCS7_get_signed_attribute(const PKCS7_SIGNER_INFO *si, int nid);
12816   int PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si,
12817                                   struct stack_st_X509_ATTRIBUTE *sk);
12818   int PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si,
12819                            struct stack_st_X509_ATTRIBUTE *sk);
12820   
12821   PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, struct stack_st_X509 *certs,
12822                     BIO *data, int flags);
12823   PKCS7 *PKCS7_sign_ex(X509 *signcert, EVP_PKEY *pkey, struct stack_st_X509 *certs,
12824                        BIO *data, int flags, OSSL_LIB_CTX *libctx,
12825                        const char *propq);
12826   
12827   PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7,
12828                                            X509 *signcert, EVP_PKEY *pkey,
12829                                            const EVP_MD *md, int flags);
12830   
12831   int PKCS7_final(PKCS7 *p7, BIO *data, int flags);
12832   int PKCS7_verify(PKCS7 *p7, struct stack_st_X509 *certs, X509_STORE *store,
12833                    BIO *indata, BIO *out, int flags);
12834   struct stack_st_X509 *PKCS7_get0_signers(PKCS7 *p7, struct stack_st_X509 *certs,
12835                                      int flags);
12836   PKCS7 *PKCS7_encrypt(struct stack_st_X509 *certs, BIO *in, const EVP_CIPHER *cipher,
12837                        int flags);
12838   PKCS7 *PKCS7_encrypt_ex(struct stack_st_X509 *certs, BIO *in,
12839                           const EVP_CIPHER *cipher, int flags,
12840                           OSSL_LIB_CTX *libctx, const char *propq);
12841   int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data,
12842                     int flags);
12843   
12844   int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si,
12845                                 struct stack_st_X509_ALGOR *cap);
12846   struct stack_st_X509_ALGOR *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si);
12847   int PKCS7_simple_smimecap(struct stack_st_X509_ALGOR *sk, int nid, int arg);
12848   
12849   int PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid);
12850   int PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t);
12851   int PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si,
12852                                const unsigned char *md, int mdlen);
12853   
12854   int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags);
12855   PKCS7 *SMIME_read_PKCS7_ex(BIO *bio, BIO **bcont, PKCS7 **p7);
12856   PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont);
12857   
12858   BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7);
12859   # 484 "include/openssl/x509.h" 2
12860   # 496 "include/openssl/x509.h"
12861   void X509_CRL_set_default_method(const X509_CRL_METHOD *meth);
12862   X509_CRL_METHOD *X509_CRL_METHOD_new(int (*crl_init) (X509_CRL *crl),
12863                                        int (*crl_free) (X509_CRL *crl),
12864                                        int (*crl_lookup) (X509_CRL *crl,
12865                                                           X509_REVOKED **ret,
12866                                                           const
12867                                                           ASN1_INTEGER *serial,
12868                                                           const
12869                                                           X509_NAME *issuer),
12870                                        int (*crl_verify) (X509_CRL *crl,
12871                                                           EVP_PKEY *pk));
12872   void X509_CRL_METHOD_free(X509_CRL_METHOD *m);
12873   
12874   void X509_CRL_set_meth_data(X509_CRL *crl, void *dat);
12875   void *X509_CRL_get_meth_data(X509_CRL *crl);
12876   
12877   const char *X509_verify_cert_error_string(long n);
12878   
12879   int X509_verify(X509 *a, EVP_PKEY *r);
12880   int X509_self_signed(X509 *cert, int verify_signature);
12881   
12882   int X509_REQ_verify_ex(X509_REQ *a, EVP_PKEY *r, OSSL_LIB_CTX *libctx,
12883                          const char *propq);
12884   int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r);
12885   int X509_CRL_verify(X509_CRL *a, EVP_PKEY *r);
12886   int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r);
12887   
12888   NETSCAPE_SPKI *NETSCAPE_SPKI_b64_decode(const char *str, int len);
12889   char *NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *x);
12890   EVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *x);
12891   int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey);
12892   
12893   int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki);
12894   
12895   int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent);
12896   int X509_signature_print(BIO *bp, const X509_ALGOR *alg,
12897                            const ASN1_STRING *sig);
12898   
12899   int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
12900   int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx);
12901   int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md);
12902   int X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx);
12903   int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md);
12904   int X509_CRL_sign_ctx(X509_CRL *x, EVP_MD_CTX *ctx);
12905   int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md);
12906   
12907   int X509_pubkey_digest(const X509 *data, const EVP_MD *type,
12908                          unsigned char *md, unsigned int *len);
12909   int X509_digest(const X509 *data, const EVP_MD *type,
12910                   unsigned char *md, unsigned int *len);
12911   ASN1_OCTET_STRING *X509_digest_sig(const X509 *cert,
12912                                      EVP_MD **md_used, int *md_is_fallback);
12913   int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type,
12914                       unsigned char *md, unsigned int *len);
12915   int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type,
12916                       unsigned char *md, unsigned int *len);
12917   int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type,
12918                        unsigned char *md, unsigned int *len);
12919   
12920   X509 *X509_load_http(const char *url, BIO *bio, BIO *rbio, int timeout);
12921   X509_CRL *X509_CRL_load_http(const char *url, BIO *bio, BIO *rbio, int timeout);
12922   
12923   # 1 "include/openssl/http.h" 1
12924   # 13 "include/openssl/http.h"
12925           
12926   
12927   
12928   
12929   
12930   
12931   # 1 "include/openssl/conf.h" 1
12932   # 17 "include/openssl/conf.h"
12933           
12934   # 28 "include/openssl/conf.h"
12935   # 1 "include/openssl/types.h" 1
12936   # 29 "include/openssl/conf.h" 2
12937   # 1 "include/openssl/conferr.h" 1
12938   # 13 "include/openssl/conferr.h"
12939           
12940   # 30 "include/openssl/conf.h" 2
12941   # 38 "include/openssl/conf.h"
12942   typedef struct {
12943       char *section;
12944       char *name;
12945       char *value;
12946   } CONF_VALUE;
12947   
12948   struct stack_st_CONF_VALUE; typedef int (*sk_CONF_VALUE_compfunc)(const CONF_VALUE * const *a, const CONF_VALUE *const *b); typedef void (*sk_CONF_VALUE_freefunc)(CONF_VALUE *a); typedef CONF_VALUE * (*sk_CONF_VALUE_copyfunc)(const CONF_VALUE *a); static __attribute__((unused)) inline CONF_VALUE *ossl_check_CONF_VALUE_type(CONF_VALUE *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_CONF_VALUE_sk_type(const struct stack_st_CONF_VALUE *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_CONF_VALUE_sk_type(struct stack_st_CONF_VALUE *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_CONF_VALUE_compfunc_type(sk_CONF_VALUE_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_CONF_VALUE_copyfunc_type(sk_CONF_VALUE_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_CONF_VALUE_freefunc_type(sk_CONF_VALUE_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
12949   # 70 "include/openssl/conf.h"
12950   struct lhash_st_CONF_VALUE { union lh_CONF_VALUE_dummy { void* d1; unsigned long d2; int d3; } dummy; }; typedef int (*lh_CONF_VALUE_compfunc)(const CONF_VALUE *a, const CONF_VALUE *b); typedef unsigned long (*lh_CONF_VALUE_hashfunc)(const CONF_VALUE *a); typedef void (*lh_CONF_VALUE_doallfunc)(CONF_VALUE *a); static inline unsigned long lh_CONF_VALUE_hash_thunk(const void *data, OPENSSL_LH_HASHFUNC hfn) { unsigned long (*hfn_conv)(const CONF_VALUE *) = (unsigned long (*)(const CONF_VALUE *))hfn; return hfn_conv((const CONF_VALUE *)data); } static inline int lh_CONF_VALUE_comp_thunk(const void *da, const void *db, OPENSSL_LH_COMPFUNC cfn) { int (*cfn_conv)(const CONF_VALUE *, const CONF_VALUE *) = (int (*)(const CONF_VALUE *, const CONF_VALUE *))cfn; return cfn_conv((const CONF_VALUE *)da, (const CONF_VALUE *)db); } static inline void lh_CONF_VALUE_doall_thunk(void *node, OPENSSL_LH_DOALL_FUNC doall) { void (*doall_conv)(CONF_VALUE *) = (void (*)(CONF_VALUE *))doall; doall_conv((CONF_VALUE *)node); } static inline void lh_CONF_VALUE_doall_arg_thunk(void *node, void *arg, OPENSSL_LH_DOALL_FUNCARG doall) { void (*doall_conv)(CONF_VALUE *, void *) = (void (*)(CONF_VALUE *, void *))doall; doall_conv((CONF_VALUE *)node, arg); } static __attribute__((unused)) inline CONF_VALUE * ossl_check_CONF_VALUE_lh_plain_type(CONF_VALUE *ptr) { return ptr; } static __attribute__((unused)) inline const CONF_VALUE * ossl_check_const_CONF_VALUE_lh_plain_type(const CONF_VALUE *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_LHASH * ossl_check_const_CONF_VALUE_lh_type(const struct lhash_st_CONF_VALUE *lh) { return (const OPENSSL_LHASH *)lh; } static __attribute__((unused)) inline OPENSSL_LHASH * ossl_check_CONF_VALUE_lh_type(struct lhash_st_CONF_VALUE *lh) { return (OPENSSL_LHASH *)lh; } static __attribute__((unused)) inline OPENSSL_LH_COMPFUNC ossl_check_CONF_VALUE_lh_compfunc_type(lh_CONF_VALUE_compfunc cmp) { return (OPENSSL_LH_COMPFUNC)cmp; } static __attribute__((unused)) inline OPENSSL_LH_HASHFUNC ossl_check_CONF_VALUE_lh_hashfunc_type(lh_CONF_VALUE_hashfunc hfn) { return (OPENSSL_LH_HASHFUNC)hfn; } static __attribute__((unused)) inline OPENSSL_LH_DOALL_FUNC ossl_check_CONF_VALUE_lh_doallfunc_type(lh_CONF_VALUE_doallfunc dfn) { return (OPENSSL_LH_DOALL_FUNC)dfn; } struct lhash_st_CONF_VALUE;
12951   # 87 "include/openssl/conf.h"
12952   struct conf_st;
12953   struct conf_method_st;
12954   typedef struct conf_method_st CONF_METHOD;
12955   
12956   
12957   # 1 "include/openssl/conftypes.h" 1
12958   # 12 "include/openssl/conftypes.h"
12959           
12960   # 21 "include/openssl/conftypes.h"
12961   struct conf_method_st {
12962       const char *name;
12963       CONF *(*create) (CONF_METHOD *meth);
12964       int (*init) (CONF *conf);
12965       int (*destroy) (CONF *conf);
12966       int (*destroy_data) (CONF *conf);
12967       int (*load_bio) (CONF *conf, BIO *bp, long *eline);
12968       int (*dump) (const CONF *conf, BIO *bp);
12969       int (*is_number) (const CONF *conf, char c);
12970       int (*to_int) (const CONF *conf, char c);
12971       int (*load) (CONF *conf, const char *name, long *eline);
12972   };
12973   
12974   struct conf_st {
12975       CONF_METHOD *meth;
12976       void *meth_data;
12977       struct lhash_st_CONF_VALUE *data;
12978       int flag_dollarid;
12979       int flag_abspath;
12980       char *includedir;
12981       OSSL_LIB_CTX *libctx;
12982   };
12983   # 93 "include/openssl/conf.h" 2
12984   
12985   
12986   
12987   typedef struct conf_imodule_st CONF_IMODULE;
12988   typedef struct conf_module_st CONF_MODULE;
12989   
12990   struct stack_st_CONF_MODULE;
12991   struct stack_st_CONF_IMODULE;
12992   
12993   
12994   typedef int conf_init_func (CONF_IMODULE *md, const CONF *cnf);
12995   typedef void conf_finish_func (CONF_IMODULE *md);
12996   # 113 "include/openssl/conf.h"
12997   int CONF_set_default_method(CONF_METHOD *meth);
12998   void CONF_set_nconf(CONF *conf, struct lhash_st_CONF_VALUE *hash);
12999   struct lhash_st_CONF_VALUE *CONF_load(struct lhash_st_CONF_VALUE *conf, const char *file,
13000                                   long *eline);
13001   
13002   struct lhash_st_CONF_VALUE *CONF_load_fp(struct lhash_st_CONF_VALUE *conf, FILE *fp,
13003                                      long *eline);
13004   
13005   struct lhash_st_CONF_VALUE *CONF_load_bio(struct lhash_st_CONF_VALUE *conf, BIO *bp,
13006                                       long *eline);
13007   struct stack_st_CONF_VALUE *CONF_get_section(struct lhash_st_CONF_VALUE *conf,
13008                                          const char *section);
13009   char *CONF_get_string(struct lhash_st_CONF_VALUE *conf, const char *group,
13010                         const char *name);
13011   long CONF_get_number(struct lhash_st_CONF_VALUE *conf, const char *group,
13012                        const char *name);
13013   void CONF_free(struct lhash_st_CONF_VALUE *conf);
13014   
13015   int CONF_dump_fp(struct lhash_st_CONF_VALUE *conf, FILE *out);
13016   
13017   int CONF_dump_bio(struct lhash_st_CONF_VALUE *conf, BIO *out);
13018   
13019   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) void OPENSSL_config(const char *config_name);
13020   # 148 "include/openssl/conf.h"
13021   CONF *NCONF_new_ex(OSSL_LIB_CTX *libctx, CONF_METHOD *meth);
13022   OSSL_LIB_CTX *NCONF_get0_libctx(const CONF *conf);
13023   CONF *NCONF_new(CONF_METHOD *meth);
13024   CONF_METHOD *NCONF_default(void);
13025   
13026   __attribute__((deprecated("Since OpenSSL " "3.0"))) CONF_METHOD *NCONF_WIN32(void);
13027   
13028   void NCONF_free(CONF *conf);
13029   void NCONF_free_data(CONF *conf);
13030   
13031   int NCONF_load(CONF *conf, const char *file, long *eline);
13032   
13033   int NCONF_load_fp(CONF *conf, FILE *fp, long *eline);
13034   
13035   int NCONF_load_bio(CONF *conf, BIO *bp, long *eline);
13036   struct stack_st_OPENSSL_CSTRING *NCONF_get_section_names(const CONF *conf);
13037   struct stack_st_CONF_VALUE *NCONF_get_section(const CONF *conf,
13038                                           const char *section);
13039   char *NCONF_get_string(const CONF *conf, const char *group, const char *name);
13040   int NCONF_get_number_e(const CONF *conf, const char *group, const char *name,
13041                          long *result);
13042   
13043   int NCONF_dump_fp(const CONF *conf, FILE *out);
13044   
13045   int NCONF_dump_bio(const CONF *conf, BIO *out);
13046   
13047   
13048   
13049   
13050   
13051   int CONF_modules_load(const CONF *cnf, const char *appname,
13052                         unsigned long flags);
13053   int CONF_modules_load_file_ex(OSSL_LIB_CTX *libctx, const char *filename,
13054                                 const char *appname, unsigned long flags);
13055   int CONF_modules_load_file(const char *filename, const char *appname,
13056                              unsigned long flags);
13057   void CONF_modules_unload(int all);
13058   void CONF_modules_finish(void);
13059   
13060   
13061   
13062   int CONF_module_add(const char *name, conf_init_func *ifunc,
13063                       conf_finish_func *ffunc);
13064   
13065   const char *CONF_imodule_get_name(const CONF_IMODULE *md);
13066   const char *CONF_imodule_get_value(const CONF_IMODULE *md);
13067   void *CONF_imodule_get_usr_data(const CONF_IMODULE *md);
13068   void CONF_imodule_set_usr_data(CONF_IMODULE *md, void *usr_data);
13069   CONF_MODULE *CONF_imodule_get_module(const CONF_IMODULE *md);
13070   unsigned long CONF_imodule_get_flags(const CONF_IMODULE *md);
13071   void CONF_imodule_set_flags(CONF_IMODULE *md, unsigned long flags);
13072   void *CONF_module_get_usr_data(CONF_MODULE *pmod);
13073   void CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data);
13074   
13075   char *CONF_get1_default_config_file(void);
13076   
13077   int CONF_parse_list(const char *list, int sep, int nospc,
13078                       int (*list_cb) (const char *elem, int len, void *usr),
13079                       void *arg);
13080   
13081   void OPENSSL_load_builtin_modules(void);
13082   # 20 "include/openssl/http.h" 2
13083   # 44 "include/openssl/http.h"
13084   OSSL_HTTP_REQ_CTX *OSSL_HTTP_REQ_CTX_new(BIO *wbio, BIO *rbio, int buf_size);
13085   void OSSL_HTTP_REQ_CTX_free(OSSL_HTTP_REQ_CTX *rctx);
13086   int OSSL_HTTP_REQ_CTX_set_request_line(OSSL_HTTP_REQ_CTX *rctx, int method_POST,
13087                                          const char *server, const char *port,
13088                                          const char *path);
13089   int OSSL_HTTP_REQ_CTX_add1_header(OSSL_HTTP_REQ_CTX *rctx,
13090                                     const char *name, const char *value);
13091   int OSSL_HTTP_REQ_CTX_set_expected(OSSL_HTTP_REQ_CTX *rctx,
13092                                      const char *content_type, int asn1,
13093                                      int timeout, int keep_alive);
13094   int OSSL_HTTP_REQ_CTX_set1_req(OSSL_HTTP_REQ_CTX *rctx, const char *content_type,
13095                                  const ASN1_ITEM *it, const ASN1_VALUE *req);
13096   int OSSL_HTTP_REQ_CTX_nbio(OSSL_HTTP_REQ_CTX *rctx);
13097   int OSSL_HTTP_REQ_CTX_nbio_d2i(OSSL_HTTP_REQ_CTX *rctx,
13098                                  ASN1_VALUE **pval, const ASN1_ITEM *it);
13099   BIO *OSSL_HTTP_REQ_CTX_exchange(OSSL_HTTP_REQ_CTX *rctx);
13100   BIO *OSSL_HTTP_REQ_CTX_get0_mem_bio(const OSSL_HTTP_REQ_CTX *rctx);
13101   size_t OSSL_HTTP_REQ_CTX_get_resp_len(const OSSL_HTTP_REQ_CTX *rctx);
13102   void OSSL_HTTP_REQ_CTX_set_max_response_length(OSSL_HTTP_REQ_CTX *rctx,
13103                                                  unsigned long len);
13104   int OSSL_HTTP_is_alive(const OSSL_HTTP_REQ_CTX *rctx);
13105   
13106   
13107   typedef BIO *(*OSSL_HTTP_bio_cb_t)(BIO *bio, void *arg, int connect, int detail);
13108   OSSL_HTTP_REQ_CTX *OSSL_HTTP_open(const char *server, const char *port,
13109                                     const char *proxy, const char *no_proxy,
13110                                     int use_ssl, BIO *bio, BIO *rbio,
13111                                     OSSL_HTTP_bio_cb_t bio_update_fn, void *arg,
13112                                     int buf_size, int overall_timeout);
13113   int OSSL_HTTP_proxy_connect(BIO *bio, const char *server, const char *port,
13114                               const char *proxyuser, const char *proxypass,
13115                               int timeout, BIO *bio_err, const char *prog);
13116   int OSSL_HTTP_set1_request(OSSL_HTTP_REQ_CTX *rctx, const char *path,
13117                              const struct stack_st_CONF_VALUE *headers,
13118                              const char *content_type, BIO *req,
13119                              const char *expected_content_type, int expect_asn1,
13120                              size_t max_resp_len, int timeout, int keep_alive);
13121   BIO *OSSL_HTTP_exchange(OSSL_HTTP_REQ_CTX *rctx, char **redirection_url);
13122   BIO *OSSL_HTTP_get(const char *url, const char *proxy, const char *no_proxy,
13123                      BIO *bio, BIO *rbio,
13124                      OSSL_HTTP_bio_cb_t bio_update_fn, void *arg,
13125                      int buf_size, const struct stack_st_CONF_VALUE *headers,
13126                      const char *expected_content_type, int expect_asn1,
13127                      size_t max_resp_len, int timeout);
13128   BIO *OSSL_HTTP_transfer(OSSL_HTTP_REQ_CTX **prctx,
13129                           const char *server, const char *port,
13130                           const char *path, int use_ssl,
13131                           const char *proxy, const char *no_proxy,
13132                           BIO *bio, BIO *rbio,
13133                           OSSL_HTTP_bio_cb_t bio_update_fn, void *arg,
13134                           int buf_size, const struct stack_st_CONF_VALUE *headers,
13135                           const char *content_type, BIO *req,
13136                           const char *expected_content_type, int expect_asn1,
13137                           size_t max_resp_len, int timeout, int keep_alive);
13138   int OSSL_HTTP_close(OSSL_HTTP_REQ_CTX *rctx, int ok);
13139   
13140   
13141   int OSSL_parse_url(const char *url, char **pscheme, char **puser, char **phost,
13142                      char **pport, int *pport_num,
13143                      char **ppath, char **pquery, char **pfrag);
13144   int OSSL_HTTP_parse_url(const char *url, int *pssl, char **puser, char **phost,
13145                           char **pport, int *pport_num,
13146                           char **ppath, char **pquery, char **pfrag);
13147   const char *OSSL_HTTP_adapt_proxy(const char *proxy, const char *no_proxy,
13148                                     const char *server, int use_ssl);
13149   
13150   void OSSL_HTTP_REQ_CTX_set_max_response_hdr_lines(OSSL_HTTP_REQ_CTX *rctx,
13151                                                     size_t count);
13152   # 559 "include/openssl/x509.h" 2
13153   
13154   
13155   
13156   
13157   
13158   
13159   
13160   X509 *d2i_X509_fp(FILE *fp, X509 **x509);
13161   int i2d_X509_fp(FILE *fp, const X509 *x509);
13162   X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl);
13163   int i2d_X509_CRL_fp(FILE *fp, const X509_CRL *crl);
13164   X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req);
13165   int i2d_X509_REQ_fp(FILE *fp, const X509_REQ *req);
13166   
13167   __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa);
13168   __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_RSAPrivateKey_fp(FILE *fp, const RSA *rsa);
13169   __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa);
13170   __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_RSAPublicKey_fp(FILE *fp, const RSA *rsa);
13171   __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa);
13172   __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_RSA_PUBKEY_fp(FILE *fp, const RSA *rsa);
13173   
13174   
13175   
13176   __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa);
13177   __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_DSA_PUBKEY_fp(FILE *fp, const DSA *dsa);
13178   __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa);
13179   __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_DSAPrivateKey_fp(FILE *fp, const DSA *dsa);
13180   
13181   
13182   
13183   
13184   __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey);
13185   __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_EC_PUBKEY_fp(FILE *fp, const EC_KEY *eckey);
13186   __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey);
13187   __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_ECPrivateKey_fp(FILE *fp, const EC_KEY *eckey);
13188   
13189   
13190   X509_SIG *d2i_PKCS8_fp(FILE *fp, X509_SIG **p8);
13191   int i2d_PKCS8_fp(FILE *fp, const X509_SIG *p8);
13192   X509_PUBKEY *d2i_X509_PUBKEY_fp(FILE *fp, X509_PUBKEY **xpk);
13193   int i2d_X509_PUBKEY_fp(FILE *fp, const X509_PUBKEY *xpk);
13194   PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,
13195                                                   PKCS8_PRIV_KEY_INFO **p8inf);
13196   int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, const PKCS8_PRIV_KEY_INFO *p8inf);
13197   int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, const EVP_PKEY *key);
13198   int i2d_PrivateKey_fp(FILE *fp, const EVP_PKEY *pkey);
13199   EVP_PKEY *d2i_PrivateKey_ex_fp(FILE *fp, EVP_PKEY **a, OSSL_LIB_CTX *libctx,
13200                                  const char *propq);
13201   EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a);
13202   int i2d_PUBKEY_fp(FILE *fp, const EVP_PKEY *pkey);
13203   EVP_PKEY *d2i_PUBKEY_ex_fp(FILE *fp, EVP_PKEY **a, OSSL_LIB_CTX *libctx,
13204                              const char *propq);
13205   EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a);
13206   
13207   
13208   X509 *d2i_X509_bio(BIO *bp, X509 **x509);
13209   int i2d_X509_bio(BIO *bp, const X509 *x509);
13210   X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl);
13211   int i2d_X509_CRL_bio(BIO *bp, const X509_CRL *crl);
13212   X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req);
13213   int i2d_X509_REQ_bio(BIO *bp, const X509_REQ *req);
13214   
13215   __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa);
13216   __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_RSAPrivateKey_bio(BIO *bp, const RSA *rsa);
13217   __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa);
13218   __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_RSAPublicKey_bio(BIO *bp, const RSA *rsa);
13219   __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa);
13220   __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_RSA_PUBKEY_bio(BIO *bp, const RSA *rsa);
13221   
13222   
13223   
13224   __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa);
13225   __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_DSA_PUBKEY_bio(BIO *bp, const DSA *dsa);
13226   __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa);
13227   __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_DSAPrivateKey_bio(BIO *bp, const DSA *dsa);
13228   
13229   
13230   
13231   
13232   
13233   __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey);
13234   __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_EC_PUBKEY_bio(BIO *bp, const EC_KEY *eckey);
13235   __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey);
13236   __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_ECPrivateKey_bio(BIO *bp, const EC_KEY *eckey);
13237   
13238   
13239   
13240   X509_SIG *d2i_PKCS8_bio(BIO *bp, X509_SIG **p8);
13241   int i2d_PKCS8_bio(BIO *bp, const X509_SIG *p8);
13242   X509_PUBKEY *d2i_X509_PUBKEY_bio(BIO *bp, X509_PUBKEY **xpk);
13243   int i2d_X509_PUBKEY_bio(BIO *bp, const X509_PUBKEY *xpk);
13244   PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
13245                                                    PKCS8_PRIV_KEY_INFO **p8inf);
13246   int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, const PKCS8_PRIV_KEY_INFO *p8inf);
13247   int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, const EVP_PKEY *key);
13248   int i2d_PrivateKey_bio(BIO *bp, const EVP_PKEY *pkey);
13249   EVP_PKEY *d2i_PrivateKey_ex_bio(BIO *bp, EVP_PKEY **a, OSSL_LIB_CTX *libctx,
13250                                   const char *propq);
13251   EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a);
13252   int i2d_PUBKEY_bio(BIO *bp, const EVP_PKEY *pkey);
13253   EVP_PKEY *d2i_PUBKEY_ex_bio(BIO *bp, EVP_PKEY **a, OSSL_LIB_CTX *libctx,
13254                               const char *propq);
13255   EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a);
13256   
13257   extern X509 *X509_dup(const X509 *a);
13258   extern X509_ALGOR *X509_ALGOR_dup(const X509_ALGOR *a);
13259   extern X509_ATTRIBUTE *X509_ATTRIBUTE_dup(const X509_ATTRIBUTE *a);
13260   extern X509_CRL *X509_CRL_dup(const X509_CRL *a);
13261   extern X509_EXTENSION *X509_EXTENSION_dup(const X509_EXTENSION *a);
13262   extern X509_PUBKEY *X509_PUBKEY_dup(const X509_PUBKEY *a);
13263   extern X509_REQ *X509_REQ_dup(const X509_REQ *a);
13264   extern X509_REVOKED *X509_REVOKED_dup(const X509_REVOKED *a);
13265   int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype,
13266                       void *pval);
13267   void X509_ALGOR_get0(const ASN1_OBJECT **paobj, int *pptype,
13268                        const void **ppval, const X509_ALGOR *algor);
13269   void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md);
13270   int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b);
13271   int X509_ALGOR_copy(X509_ALGOR *dest, const X509_ALGOR *src);
13272   
13273   extern X509_NAME *X509_NAME_dup(const X509_NAME *a);
13274   extern X509_NAME_ENTRY *X509_NAME_ENTRY_dup(const X509_NAME_ENTRY *a);
13275   
13276   int X509_cmp_time(const ASN1_TIME *s, time_t *t);
13277   int X509_cmp_current_time(const ASN1_TIME *s);
13278   int X509_cmp_timeframe(const X509_VERIFY_PARAM *vpm,
13279                          const ASN1_TIME *start, const ASN1_TIME *end);
13280   ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *t);
13281   ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s,
13282                               int offset_day, long offset_sec, time_t *t);
13283   ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj);
13284   
13285   const char *X509_get_default_cert_area(void);
13286   const char *X509_get_default_cert_dir(void);
13287   const char *X509_get_default_cert_file(void);
13288   const char *X509_get_default_cert_dir_env(void);
13289   const char *X509_get_default_cert_file_env(void);
13290   const char *X509_get_default_private_dir(void);
13291   
13292   X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
13293   X509 *X509_REQ_to_X509(X509_REQ *r, int days, EVP_PKEY *pkey);
13294   
13295   extern X509_ALGOR *X509_ALGOR_new(void); extern void X509_ALGOR_free(X509_ALGOR *a); extern X509_ALGOR *d2i_X509_ALGOR(X509_ALGOR **a, const unsigned char **in, long len); extern int i2d_X509_ALGOR(const X509_ALGOR *a, unsigned char **out); extern const ASN1_ITEM * X509_ALGOR_it(void);
13296   extern X509_ALGORS *d2i_X509_ALGORS(X509_ALGORS **a, const unsigned char **in, long len); extern int i2d_X509_ALGORS(const X509_ALGORS *a, unsigned char **out); extern const ASN1_ITEM * X509_ALGORS_it(void);
13297   extern X509_VAL *X509_VAL_new(void); extern void X509_VAL_free(X509_VAL *a); extern X509_VAL *d2i_X509_VAL(X509_VAL **a, const unsigned char **in, long len); extern int i2d_X509_VAL(const X509_VAL *a, unsigned char **out); extern const ASN1_ITEM * X509_VAL_it(void);
13298   
13299   extern X509_PUBKEY *X509_PUBKEY_new(void); extern void X509_PUBKEY_free(X509_PUBKEY *a); extern X509_PUBKEY *d2i_X509_PUBKEY(X509_PUBKEY **a, const unsigned char **in, long len); extern int i2d_X509_PUBKEY(const X509_PUBKEY *a, unsigned char **out); extern const ASN1_ITEM * X509_PUBKEY_it(void);
13300   
13301   X509_PUBKEY *X509_PUBKEY_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
13302   int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey);
13303   EVP_PKEY *X509_PUBKEY_get0(const X509_PUBKEY *key);
13304   EVP_PKEY *X509_PUBKEY_get(const X509_PUBKEY *key);
13305   int X509_get_pubkey_parameters(EVP_PKEY *pkey, struct stack_st_X509 *chain);
13306   long X509_get_pathlen(X509 *x);
13307   extern EVP_PKEY *d2i_PUBKEY(EVP_PKEY **a, const unsigned char **in, long len); extern int i2d_PUBKEY(const EVP_PKEY *a, unsigned char **out);
13308   EVP_PKEY *d2i_PUBKEY_ex(EVP_PKEY **a, const unsigned char **pp, long length,
13309                           OSSL_LIB_CTX *libctx, const char *propq);
13310   
13311   __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *d2i_RSA_PUBKEY(RSA **a, const unsigned char **in, long len); __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_RSA_PUBKEY(const RSA *a, unsigned char **out);
13312   
13313   
13314   
13315   __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *d2i_DSA_PUBKEY(DSA **a, const unsigned char **in, long len); __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_DSA_PUBKEY(const DSA *a, unsigned char **out);
13316   
13317   
13318   
13319   
13320   __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *d2i_EC_PUBKEY(EC_KEY **a, const unsigned char **in, long len); __attribute__((deprecated("Since OpenSSL " "3.0"))) int i2d_EC_PUBKEY(const EC_KEY *a, unsigned char **out);
13321   
13322   
13323   
13324   extern X509_SIG *X509_SIG_new(void); extern void X509_SIG_free(X509_SIG *a); extern X509_SIG *d2i_X509_SIG(X509_SIG **a, const unsigned char **in, long len); extern int i2d_X509_SIG(const X509_SIG *a, unsigned char **out); extern const ASN1_ITEM * X509_SIG_it(void);
13325   void X509_SIG_get0(const X509_SIG *sig, const X509_ALGOR **palg,
13326                      const ASN1_OCTET_STRING **pdigest);
13327   void X509_SIG_getm(X509_SIG *sig, X509_ALGOR **palg,
13328                      ASN1_OCTET_STRING **pdigest);
13329   
13330   extern X509_REQ_INFO *X509_REQ_INFO_new(void); extern void X509_REQ_INFO_free(X509_REQ_INFO *a); extern X509_REQ_INFO *d2i_X509_REQ_INFO(X509_REQ_INFO **a, const unsigned char **in, long len); extern int i2d_X509_REQ_INFO(const X509_REQ_INFO *a, unsigned char **out); extern const ASN1_ITEM * X509_REQ_INFO_it(void);
13331   extern X509_REQ *X509_REQ_new(void); extern void X509_REQ_free(X509_REQ *a); extern X509_REQ *d2i_X509_REQ(X509_REQ **a, const unsigned char **in, long len); extern int i2d_X509_REQ(const X509_REQ *a, unsigned char **out); extern const ASN1_ITEM * X509_REQ_it(void);
13332   X509_REQ *X509_REQ_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
13333   
13334   extern X509_ATTRIBUTE *X509_ATTRIBUTE_new(void); extern void X509_ATTRIBUTE_free(X509_ATTRIBUTE *a); extern X509_ATTRIBUTE *d2i_X509_ATTRIBUTE(X509_ATTRIBUTE **a, const unsigned char **in, long len); extern int i2d_X509_ATTRIBUTE(const X509_ATTRIBUTE *a, unsigned char **out); extern const ASN1_ITEM * X509_ATTRIBUTE_it(void);
13335   X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value);
13336   
13337   extern X509_EXTENSION *X509_EXTENSION_new(void); extern void X509_EXTENSION_free(X509_EXTENSION *a); extern X509_EXTENSION *d2i_X509_EXTENSION(X509_EXTENSION **a, const unsigned char **in, long len); extern int i2d_X509_EXTENSION(const X509_EXTENSION *a, unsigned char **out); extern const ASN1_ITEM * X509_EXTENSION_it(void);
13338   extern X509_EXTENSIONS *d2i_X509_EXTENSIONS(X509_EXTENSIONS **a, const unsigned char **in, long len); extern int i2d_X509_EXTENSIONS(const X509_EXTENSIONS *a, unsigned char **out); extern const ASN1_ITEM * X509_EXTENSIONS_it(void);
13339   
13340   extern X509_NAME_ENTRY *X509_NAME_ENTRY_new(void); extern void X509_NAME_ENTRY_free(X509_NAME_ENTRY *a); extern X509_NAME_ENTRY *d2i_X509_NAME_ENTRY(X509_NAME_ENTRY **a, const unsigned char **in, long len); extern int i2d_X509_NAME_ENTRY(const X509_NAME_ENTRY *a, unsigned char **out); extern const ASN1_ITEM * X509_NAME_ENTRY_it(void);
13341   
13342   extern X509_NAME *X509_NAME_new(void); extern void X509_NAME_free(X509_NAME *a); extern X509_NAME *d2i_X509_NAME(X509_NAME **a, const unsigned char **in, long len); extern int i2d_X509_NAME(const X509_NAME *a, unsigned char **out); extern const ASN1_ITEM * X509_NAME_it(void);
13343   
13344   int X509_NAME_set(X509_NAME **xn, const X509_NAME *name);
13345   
13346   extern X509_CINF *X509_CINF_new(void); extern void X509_CINF_free(X509_CINF *a); extern X509_CINF *d2i_X509_CINF(X509_CINF **a, const unsigned char **in, long len); extern int i2d_X509_CINF(const X509_CINF *a, unsigned char **out); extern const ASN1_ITEM * X509_CINF_it(void);
13347   extern X509 *X509_new(void); extern void X509_free(X509 *a); extern X509 *d2i_X509(X509 **a, const unsigned char **in, long len); extern int i2d_X509(const X509 *a, unsigned char **out); extern const ASN1_ITEM * X509_it(void);
13348   X509 *X509_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
13349   extern X509_CERT_AUX *X509_CERT_AUX_new(void); extern void X509_CERT_AUX_free(X509_CERT_AUX *a); extern X509_CERT_AUX *d2i_X509_CERT_AUX(X509_CERT_AUX **a, const unsigned char **in, long len); extern int i2d_X509_CERT_AUX(const X509_CERT_AUX *a, unsigned char **out); extern const ASN1_ITEM * X509_CERT_AUX_it(void);
13350   
13351   
13352   
13353   int X509_set_ex_data(X509 *r, int idx, void *arg);
13354   void *X509_get_ex_data(const X509 *r, int idx);
13355   extern X509 *d2i_X509_AUX(X509 **a, const unsigned char **in, long len); extern int i2d_X509_AUX(const X509 *a, unsigned char **out);
13356   
13357   int i2d_re_X509_tbs(X509 *x, unsigned char **pp);
13358   
13359   int X509_SIG_INFO_get(const X509_SIG_INFO *siginf, int *mdnid, int *pknid,
13360                         int *secbits, uint32_t *flags);
13361   void X509_SIG_INFO_set(X509_SIG_INFO *siginf, int mdnid, int pknid,
13362                          int secbits, uint32_t flags);
13363   
13364   int X509_get_signature_info(X509 *x, int *mdnid, int *pknid, int *secbits,
13365                               uint32_t *flags);
13366   
13367   void X509_get0_signature(const ASN1_BIT_STRING **psig,
13368                            const X509_ALGOR **palg, const X509 *x);
13369   int X509_get_signature_nid(const X509 *x);
13370   
13371   void X509_set0_distinguishing_id(X509 *x, ASN1_OCTET_STRING *d_id);
13372   ASN1_OCTET_STRING *X509_get0_distinguishing_id(X509 *x);
13373   void X509_REQ_set0_distinguishing_id(X509_REQ *x, ASN1_OCTET_STRING *d_id);
13374   ASN1_OCTET_STRING *X509_REQ_get0_distinguishing_id(X509_REQ *x);
13375   
13376   int X509_alias_set1(X509 *x, const unsigned char *name, int len);
13377   int X509_keyid_set1(X509 *x, const unsigned char *id, int len);
13378   unsigned char *X509_alias_get0(X509 *x, int *len);
13379   unsigned char *X509_keyid_get0(X509 *x, int *len);
13380   
13381   extern X509_REVOKED *X509_REVOKED_new(void); extern void X509_REVOKED_free(X509_REVOKED *a); extern X509_REVOKED *d2i_X509_REVOKED(X509_REVOKED **a, const unsigned char **in, long len); extern int i2d_X509_REVOKED(const X509_REVOKED *a, unsigned char **out); extern const ASN1_ITEM * X509_REVOKED_it(void);
13382   extern X509_CRL_INFO *X509_CRL_INFO_new(void); extern void X509_CRL_INFO_free(X509_CRL_INFO *a); extern X509_CRL_INFO *d2i_X509_CRL_INFO(X509_CRL_INFO **a, const unsigned char **in, long len); extern int i2d_X509_CRL_INFO(const X509_CRL_INFO *a, unsigned char **out); extern const ASN1_ITEM * X509_CRL_INFO_it(void);
13383   extern X509_CRL *X509_CRL_new(void); extern void X509_CRL_free(X509_CRL *a); extern X509_CRL *d2i_X509_CRL(X509_CRL **a, const unsigned char **in, long len); extern int i2d_X509_CRL(const X509_CRL *a, unsigned char **out); extern const ASN1_ITEM * X509_CRL_it(void);
13384   X509_CRL *X509_CRL_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
13385   
13386   int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
13387   int X509_CRL_get0_by_serial(X509_CRL *crl,
13388                               X509_REVOKED **ret, const ASN1_INTEGER *serial);
13389   int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x);
13390   
13391   X509_PKEY *X509_PKEY_new(void);
13392   void X509_PKEY_free(X509_PKEY *a);
13393   
13394   extern NETSCAPE_SPKI *NETSCAPE_SPKI_new(void); extern void NETSCAPE_SPKI_free(NETSCAPE_SPKI *a); extern NETSCAPE_SPKI *d2i_NETSCAPE_SPKI(NETSCAPE_SPKI **a, const unsigned char **in, long len); extern int i2d_NETSCAPE_SPKI(const NETSCAPE_SPKI *a, unsigned char **out); extern const ASN1_ITEM * NETSCAPE_SPKI_it(void);
13395   extern NETSCAPE_SPKAC *NETSCAPE_SPKAC_new(void); extern void NETSCAPE_SPKAC_free(NETSCAPE_SPKAC *a); extern NETSCAPE_SPKAC *d2i_NETSCAPE_SPKAC(NETSCAPE_SPKAC **a, const unsigned char **in, long len); extern int i2d_NETSCAPE_SPKAC(const NETSCAPE_SPKAC *a, unsigned char **out); extern const ASN1_ITEM * NETSCAPE_SPKAC_it(void);
13396   extern NETSCAPE_CERT_SEQUENCE *NETSCAPE_CERT_SEQUENCE_new(void); extern void NETSCAPE_CERT_SEQUENCE_free(NETSCAPE_CERT_SEQUENCE *a); extern NETSCAPE_CERT_SEQUENCE *d2i_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE **a, const unsigned char **in, long len); extern int i2d_NETSCAPE_CERT_SEQUENCE(const NETSCAPE_CERT_SEQUENCE *a, unsigned char **out); extern const ASN1_ITEM * NETSCAPE_CERT_SEQUENCE_it(void);
13397   
13398   X509_INFO *X509_INFO_new(void);
13399   void X509_INFO_free(X509_INFO *a);
13400   char *X509_NAME_oneline(const X509_NAME *a, char *buf, int size);
13401   
13402   
13403   __attribute__((deprecated("Since OpenSSL " "3.0")))
13404   int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1,
13405                   ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey);
13406   __attribute__((deprecated("Since OpenSSL " "3.0")))
13407   int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data,
13408                   unsigned char *md, unsigned int *len);
13409   __attribute__((deprecated("Since OpenSSL " "3.0")))
13410   int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1, X509_ALGOR *algor2,
13411                 ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey,
13412                 const EVP_MD *type);
13413   
13414   int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *data,
13415                        unsigned char *md, unsigned int *len);
13416   int ASN1_item_verify(const ASN1_ITEM *it, const X509_ALGOR *alg,
13417                        const ASN1_BIT_STRING *signature, const void *data,
13418                        EVP_PKEY *pkey);
13419   int ASN1_item_verify_ctx(const ASN1_ITEM *it, const X509_ALGOR *alg,
13420                            const ASN1_BIT_STRING *signature, const void *data,
13421                            EVP_MD_CTX *ctx);
13422   int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
13423                      ASN1_BIT_STRING *signature, const void *data,
13424                      EVP_PKEY *pkey, const EVP_MD *md);
13425   int ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1,
13426                          X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
13427                          const void *data, EVP_MD_CTX *ctx);
13428   
13429   
13430   
13431   
13432   
13433   long X509_get_version(const X509 *x);
13434   int X509_set_version(X509 *x, long version);
13435   int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);
13436   ASN1_INTEGER *X509_get_serialNumber(X509 *x);
13437   const ASN1_INTEGER *X509_get0_serialNumber(const X509 *x);
13438   int X509_set_issuer_name(X509 *x, const X509_NAME *name);
13439   X509_NAME *X509_get_issuer_name(const X509 *a);
13440   int X509_set_subject_name(X509 *x, const X509_NAME *name);
13441   X509_NAME *X509_get_subject_name(const X509 *a);
13442   const ASN1_TIME * X509_get0_notBefore(const X509 *x);
13443   ASN1_TIME *X509_getm_notBefore(const X509 *x);
13444   int X509_set1_notBefore(X509 *x, const ASN1_TIME *tm);
13445   const ASN1_TIME *X509_get0_notAfter(const X509 *x);
13446   ASN1_TIME *X509_getm_notAfter(const X509 *x);
13447   int X509_set1_notAfter(X509 *x, const ASN1_TIME *tm);
13448   int X509_set_pubkey(X509 *x, EVP_PKEY *pkey);
13449   int X509_up_ref(X509 *x);
13450   int X509_get_signature_type(const X509 *x);
13451   # 870 "include/openssl/x509.h"
13452   X509_PUBKEY *X509_get_X509_PUBKEY(const X509 *x);
13453   const struct stack_st_X509_EXTENSION *X509_get0_extensions(const X509 *x);
13454   void X509_get0_uids(const X509 *x, const ASN1_BIT_STRING **piuid,
13455                       const ASN1_BIT_STRING **psuid);
13456   const X509_ALGOR *X509_get0_tbs_sigalg(const X509 *x);
13457   
13458   EVP_PKEY *X509_get0_pubkey(const X509 *x);
13459   EVP_PKEY *X509_get_pubkey(X509 *x);
13460   ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x);
13461   
13462   
13463   
13464   long X509_REQ_get_version(const X509_REQ *req);
13465   int X509_REQ_set_version(X509_REQ *x, long version);
13466   X509_NAME *X509_REQ_get_subject_name(const X509_REQ *req);
13467   int X509_REQ_set_subject_name(X509_REQ *req, const X509_NAME *name);
13468   void X509_REQ_get0_signature(const X509_REQ *req, const ASN1_BIT_STRING **psig,
13469                                const X509_ALGOR **palg);
13470   void X509_REQ_set0_signature(X509_REQ *req, ASN1_BIT_STRING *psig);
13471   int X509_REQ_set1_signature_algo(X509_REQ *req, X509_ALGOR *palg);
13472   int X509_REQ_get_signature_nid(const X509_REQ *req);
13473   int i2d_re_X509_REQ_tbs(X509_REQ *req, unsigned char **pp);
13474   int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);
13475   EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req);
13476   EVP_PKEY *X509_REQ_get0_pubkey(const X509_REQ *req);
13477   X509_PUBKEY *X509_REQ_get_X509_PUBKEY(X509_REQ *req);
13478   int X509_REQ_extension_nid(int nid);
13479   int *X509_REQ_get_extension_nids(void);
13480   void X509_REQ_set_extension_nids(int *nids);
13481   struct stack_st_X509_EXTENSION *X509_REQ_get_extensions(X509_REQ *req);
13482   int X509_REQ_add_extensions_nid(X509_REQ *req,
13483                                   const struct stack_st_X509_EXTENSION *exts, int nid);
13484   int X509_REQ_add_extensions(X509_REQ *req, const struct stack_st_X509_EXTENSION *ext);
13485   int X509_REQ_get_attr_count(const X509_REQ *req);
13486   int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, int lastpos);
13487   int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, const ASN1_OBJECT *obj,
13488                                int lastpos);
13489   X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc);
13490   X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc);
13491   int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr);
13492   int X509_REQ_add1_attr_by_OBJ(X509_REQ *req,
13493                                 const ASN1_OBJECT *obj, int type,
13494                                 const unsigned char *bytes, int len);
13495   int X509_REQ_add1_attr_by_NID(X509_REQ *req,
13496                                 int nid, int type,
13497                                 const unsigned char *bytes, int len);
13498   int X509_REQ_add1_attr_by_txt(X509_REQ *req,
13499                                 const char *attrname, int type,
13500                                 const unsigned char *bytes, int len);
13501   
13502   
13503   
13504   
13505   int X509_CRL_set_version(X509_CRL *x, long version);
13506   int X509_CRL_set_issuer_name(X509_CRL *x, const X509_NAME *name);
13507   int X509_CRL_set1_lastUpdate(X509_CRL *x, const ASN1_TIME *tm);
13508   int X509_CRL_set1_nextUpdate(X509_CRL *x, const ASN1_TIME *tm);
13509   int X509_CRL_sort(X509_CRL *crl);
13510   int X509_CRL_up_ref(X509_CRL *crl);
13511   
13512   
13513   
13514   
13515   
13516   
13517   long X509_CRL_get_version(const X509_CRL *crl);
13518   const ASN1_TIME *X509_CRL_get0_lastUpdate(const X509_CRL *crl);
13519   const ASN1_TIME *X509_CRL_get0_nextUpdate(const X509_CRL *crl);
13520   
13521   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) ASN1_TIME *X509_CRL_get_lastUpdate(X509_CRL *crl);
13522   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) ASN1_TIME *X509_CRL_get_nextUpdate(X509_CRL *crl);
13523   
13524   X509_NAME *X509_CRL_get_issuer(const X509_CRL *crl);
13525   const struct stack_st_X509_EXTENSION *X509_CRL_get0_extensions(const X509_CRL *crl);
13526   struct stack_st_X509_REVOKED *X509_CRL_get_REVOKED(X509_CRL *crl);
13527   void X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig,
13528                                const X509_ALGOR **palg);
13529   int X509_CRL_get_signature_nid(const X509_CRL *crl);
13530   int i2d_re_X509_CRL_tbs(X509_CRL *req, unsigned char **pp);
13531   
13532   const ASN1_INTEGER *X509_REVOKED_get0_serialNumber(const X509_REVOKED *x);
13533   int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial);
13534   const ASN1_TIME *X509_REVOKED_get0_revocationDate(const X509_REVOKED *x);
13535   int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);
13536   const struct stack_st_X509_EXTENSION *
13537   X509_REVOKED_get0_extensions(const X509_REVOKED *r);
13538   
13539   X509_CRL *X509_CRL_diff(X509_CRL *base, X509_CRL *newer,
13540                           EVP_PKEY *skey, const EVP_MD *md, unsigned int flags);
13541   
13542   int X509_REQ_check_private_key(const X509_REQ *req, EVP_PKEY *pkey);
13543   
13544   int X509_check_private_key(const X509 *cert, const EVP_PKEY *pkey);
13545   int X509_chain_check_suiteb(int *perror_depth,
13546                               X509 *x, struct stack_st_X509 *chain,
13547                               unsigned long flags);
13548   int X509_CRL_check_suiteb(X509_CRL *crl, EVP_PKEY *pk, unsigned long flags);
13549   void OSSL_STACK_OF_X509_free(struct stack_st_X509 *certs);
13550   struct stack_st_X509 *X509_chain_up_ref(struct stack_st_X509 *chain);
13551   
13552   int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b);
13553   unsigned long X509_issuer_and_serial_hash(X509 *a);
13554   
13555   int X509_issuer_name_cmp(const X509 *a, const X509 *b);
13556   unsigned long X509_issuer_name_hash(X509 *a);
13557   
13558   int X509_subject_name_cmp(const X509 *a, const X509 *b);
13559   unsigned long X509_subject_name_hash(X509 *x);
13560   
13561   
13562   unsigned long X509_issuer_name_hash_old(X509 *a);
13563   unsigned long X509_subject_name_hash_old(X509 *x);
13564   
13565   
13566   
13567   
13568   
13569   
13570   
13571   int X509_add_cert(struct stack_st_X509 *sk, X509 *cert, int flags);
13572   int X509_add_certs(struct stack_st_X509 *sk, struct stack_st_X509 *certs, int flags);
13573   
13574   int X509_cmp(const X509 *a, const X509 *b);
13575   int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b);
13576   
13577   
13578   __attribute__((deprecated("Since OpenSSL " "3.0"))) int X509_certificate_type(const X509 *x,
13579                                                   const EVP_PKEY *pubkey);
13580   
13581   unsigned long X509_NAME_hash_ex(const X509_NAME *x, OSSL_LIB_CTX *libctx,
13582                                   const char *propq, int *ok);
13583   unsigned long X509_NAME_hash_old(const X509_NAME *x);
13584   
13585   int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b);
13586   int X509_CRL_match(const X509_CRL *a, const X509_CRL *b);
13587   int X509_aux_print(BIO *out, X509 *x, int indent);
13588   
13589   int X509_print_ex_fp(FILE *bp, X509 *x, unsigned long nmflag,
13590                        unsigned long cflag);
13591   int X509_print_fp(FILE *bp, X509 *x);
13592   int X509_CRL_print_fp(FILE *bp, X509_CRL *x);
13593   int X509_REQ_print_fp(FILE *bp, X509_REQ *req);
13594   int X509_NAME_print_ex_fp(FILE *fp, const X509_NAME *nm, int indent,
13595                             unsigned long flags);
13596   
13597   
13598   int X509_NAME_print(BIO *bp, const X509_NAME *name, int obase);
13599   int X509_NAME_print_ex(BIO *out, const X509_NAME *nm, int indent,
13600                          unsigned long flags);
13601   int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflag,
13602                     unsigned long cflag);
13603   int X509_print(BIO *bp, X509 *x);
13604   int X509_ocspid_print(BIO *bp, X509 *x);
13605   int X509_CRL_print_ex(BIO *out, X509_CRL *x, unsigned long nmflag);
13606   int X509_CRL_print(BIO *bp, X509_CRL *x);
13607   int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag,
13608                         unsigned long cflag);
13609   int X509_REQ_print(BIO *bp, X509_REQ *req);
13610   
13611   int X509_NAME_entry_count(const X509_NAME *name);
13612   int X509_NAME_get_text_by_NID(const X509_NAME *name, int nid,
13613                                 char *buf, int len);
13614   int X509_NAME_get_text_by_OBJ(const X509_NAME *name, const ASN1_OBJECT *obj,
13615                                 char *buf, int len);
13616   
13617   
13618   
13619   
13620   
13621   int X509_NAME_get_index_by_NID(const X509_NAME *name, int nid, int lastpos);
13622   int X509_NAME_get_index_by_OBJ(const X509_NAME *name, const ASN1_OBJECT *obj,
13623                                  int lastpos);
13624   X509_NAME_ENTRY *X509_NAME_get_entry(const X509_NAME *name, int loc);
13625   X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc);
13626   int X509_NAME_add_entry(X509_NAME *name, const X509_NAME_ENTRY *ne,
13627                           int loc, int set);
13628   int X509_NAME_add_entry_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj, int type,
13629                                  const unsigned char *bytes, int len, int loc,
13630                                  int set);
13631   int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type,
13632                                  const unsigned char *bytes, int len, int loc,
13633                                  int set);
13634   X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne,
13635                                                  const char *field, int type,
13636                                                  const unsigned char *bytes,
13637                                                  int len);
13638   X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid,
13639                                                  int type,
13640                                                  const unsigned char *bytes,
13641                                                  int len);
13642   int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type,
13643                                  const unsigned char *bytes, int len, int loc,
13644                                  int set);
13645   X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne,
13646                                                  const ASN1_OBJECT *obj, int type,
13647                                                  const unsigned char *bytes,
13648                                                  int len);
13649   int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, const ASN1_OBJECT *obj);
13650   int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type,
13651                                const unsigned char *bytes, int len);
13652   ASN1_OBJECT *X509_NAME_ENTRY_get_object(const X509_NAME_ENTRY *ne);
13653   ASN1_STRING * X509_NAME_ENTRY_get_data(const X509_NAME_ENTRY *ne);
13654   int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne);
13655   
13656   int X509_NAME_get0_der(const X509_NAME *nm, const unsigned char **pder,
13657                          size_t *pderlen);
13658   
13659   int X509v3_get_ext_count(const struct stack_st_X509_EXTENSION *x);
13660   int X509v3_get_ext_by_NID(const struct stack_st_X509_EXTENSION *x,
13661                             int nid, int lastpos);
13662   int X509v3_get_ext_by_OBJ(const struct stack_st_X509_EXTENSION *x,
13663                             const ASN1_OBJECT *obj, int lastpos);
13664   int X509v3_get_ext_by_critical(const struct stack_st_X509_EXTENSION *x,
13665                                  int crit, int lastpos);
13666   X509_EXTENSION *X509v3_get_ext(const struct stack_st_X509_EXTENSION *x, int loc);
13667   X509_EXTENSION *X509v3_delete_ext(struct stack_st_X509_EXTENSION *x, int loc);
13668   struct stack_st_X509_EXTENSION *X509v3_add_ext(struct stack_st_X509_EXTENSION **x,
13669                                            X509_EXTENSION *ex, int loc);
13670   
13671   int X509_get_ext_count(const X509 *x);
13672   int X509_get_ext_by_NID(const X509 *x, int nid, int lastpos);
13673   int X509_get_ext_by_OBJ(const X509 *x, const ASN1_OBJECT *obj, int lastpos);
13674   int X509_get_ext_by_critical(const X509 *x, int crit, int lastpos);
13675   X509_EXTENSION *X509_get_ext(const X509 *x, int loc);
13676   X509_EXTENSION *X509_delete_ext(X509 *x, int loc);
13677   int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc);
13678   void *X509_get_ext_d2i(const X509 *x, int nid, int *crit, int *idx);
13679   int X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit,
13680                         unsigned long flags);
13681   
13682   int X509_CRL_get_ext_count(const X509_CRL *x);
13683   int X509_CRL_get_ext_by_NID(const X509_CRL *x, int nid, int lastpos);
13684   int X509_CRL_get_ext_by_OBJ(const X509_CRL *x, const ASN1_OBJECT *obj,
13685                               int lastpos);
13686   int X509_CRL_get_ext_by_critical(const X509_CRL *x, int crit, int lastpos);
13687   X509_EXTENSION *X509_CRL_get_ext(const X509_CRL *x, int loc);
13688   X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc);
13689   int X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc);
13690   void *X509_CRL_get_ext_d2i(const X509_CRL *x, int nid, int *crit, int *idx);
13691   int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit,
13692                             unsigned long flags);
13693   
13694   int X509_REVOKED_get_ext_count(const X509_REVOKED *x);
13695   int X509_REVOKED_get_ext_by_NID(const X509_REVOKED *x, int nid, int lastpos);
13696   int X509_REVOKED_get_ext_by_OBJ(const X509_REVOKED *x, const ASN1_OBJECT *obj,
13697                                   int lastpos);
13698   int X509_REVOKED_get_ext_by_critical(const X509_REVOKED *x, int crit,
13699                                        int lastpos);
13700   X509_EXTENSION *X509_REVOKED_get_ext(const X509_REVOKED *x, int loc);
13701   X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc);
13702   int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc);
13703   void *X509_REVOKED_get_ext_d2i(const X509_REVOKED *x, int nid, int *crit,
13704                                  int *idx);
13705   int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit,
13706                                 unsigned long flags);
13707   
13708   X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex,
13709                                                int nid, int crit,
13710                                                ASN1_OCTET_STRING *data);
13711   X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex,
13712                                                const ASN1_OBJECT *obj, int crit,
13713                                                ASN1_OCTET_STRING *data);
13714   int X509_EXTENSION_set_object(X509_EXTENSION *ex, const ASN1_OBJECT *obj);
13715   int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit);
13716   int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data);
13717   ASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *ex);
13718   ASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *ne);
13719   int X509_EXTENSION_get_critical(const X509_EXTENSION *ex);
13720   
13721   int X509at_get_attr_count(const struct stack_st_X509_ATTRIBUTE *x);
13722   int X509at_get_attr_by_NID(const struct stack_st_X509_ATTRIBUTE *x, int nid,
13723                              int lastpos);
13724   int X509at_get_attr_by_OBJ(const struct stack_st_X509_ATTRIBUTE *sk,
13725                              const ASN1_OBJECT *obj, int lastpos);
13726   X509_ATTRIBUTE *X509at_get_attr(const struct stack_st_X509_ATTRIBUTE *x, int loc);
13727   X509_ATTRIBUTE *X509at_delete_attr(struct stack_st_X509_ATTRIBUTE *x, int loc);
13728   struct stack_st_X509_ATTRIBUTE *X509at_add1_attr(struct stack_st_X509_ATTRIBUTE **x,
13729                                              X509_ATTRIBUTE *attr);
13730   struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_OBJ(struct stack_st_X509_ATTRIBUTE
13731                                                     **x, const ASN1_OBJECT *obj,
13732                                                     int type,
13733                                                     const unsigned char *bytes,
13734                                                     int len);
13735   struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_NID(struct stack_st_X509_ATTRIBUTE
13736                                                     **x, int nid, int type,
13737                                                     const unsigned char *bytes,
13738                                                     int len);
13739   struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_txt(struct stack_st_X509_ATTRIBUTE
13740                                                     **x, const char *attrname,
13741                                                     int type,
13742                                                     const unsigned char *bytes,
13743                                                     int len);
13744   void *X509at_get0_data_by_OBJ(const struct stack_st_X509_ATTRIBUTE *x,
13745                                 const ASN1_OBJECT *obj, int lastpos, int type);
13746   X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid,
13747                                                int atrtype, const void *data,
13748                                                int len);
13749   X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr,
13750                                                const ASN1_OBJECT *obj,
13751                                                int atrtype, const void *data,
13752                                                int len);
13753   X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr,
13754                                                const char *atrname, int type,
13755                                                const unsigned char *bytes,
13756                                                int len);
13757   int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj);
13758   int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype,
13759                                const void *data, int len);
13760   void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx, int atrtype,
13761                                  void *data);
13762   int X509_ATTRIBUTE_count(const X509_ATTRIBUTE *attr);
13763   ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr);
13764   ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx);
13765   
13766   int EVP_PKEY_get_attr_count(const EVP_PKEY *key);
13767   int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos);
13768   int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, const ASN1_OBJECT *obj,
13769                                int lastpos);
13770   X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc);
13771   X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc);
13772   int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr);
13773   int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key,
13774                                 const ASN1_OBJECT *obj, int type,
13775                                 const unsigned char *bytes, int len);
13776   int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key,
13777                                 int nid, int type,
13778                                 const unsigned char *bytes, int len);
13779   int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key,
13780                                 const char *attrname, int type,
13781                                 const unsigned char *bytes, int len);
13782   
13783   
13784   X509 *X509_find_by_issuer_and_serial(struct stack_st_X509 *sk, const X509_NAME *name,
13785                                        const ASN1_INTEGER *serial);
13786   X509 *X509_find_by_subject(struct stack_st_X509 *sk, const X509_NAME *name);
13787   
13788   extern PBEPARAM *PBEPARAM_new(void); extern void PBEPARAM_free(PBEPARAM *a); extern PBEPARAM *d2i_PBEPARAM(PBEPARAM **a, const unsigned char **in, long len); extern int i2d_PBEPARAM(const PBEPARAM *a, unsigned char **out); extern const ASN1_ITEM * PBEPARAM_it(void);
13789   extern PBE2PARAM *PBE2PARAM_new(void); extern void PBE2PARAM_free(PBE2PARAM *a); extern PBE2PARAM *d2i_PBE2PARAM(PBE2PARAM **a, const unsigned char **in, long len); extern int i2d_PBE2PARAM(const PBE2PARAM *a, unsigned char **out); extern const ASN1_ITEM * PBE2PARAM_it(void);
13790   extern PBKDF2PARAM *PBKDF2PARAM_new(void); extern void PBKDF2PARAM_free(PBKDF2PARAM *a); extern PBKDF2PARAM *d2i_PBKDF2PARAM(PBKDF2PARAM **a, const unsigned char **in, long len); extern int i2d_PBKDF2PARAM(const PBKDF2PARAM *a, unsigned char **out); extern const ASN1_ITEM * PBKDF2PARAM_it(void);
13791   
13792   extern SCRYPT_PARAMS *SCRYPT_PARAMS_new(void); extern void SCRYPT_PARAMS_free(SCRYPT_PARAMS *a); extern SCRYPT_PARAMS *d2i_SCRYPT_PARAMS(SCRYPT_PARAMS **a, const unsigned char **in, long len); extern int i2d_SCRYPT_PARAMS(const SCRYPT_PARAMS *a, unsigned char **out); extern const ASN1_ITEM * SCRYPT_PARAMS_it(void);
13793   
13794   
13795   int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter,
13796                            const unsigned char *salt, int saltlen);
13797   int PKCS5_pbe_set0_algor_ex(X509_ALGOR *algor, int alg, int iter,
13798                               const unsigned char *salt, int saltlen,
13799                               OSSL_LIB_CTX *libctx);
13800   
13801   X509_ALGOR *PKCS5_pbe_set(int alg, int iter,
13802                             const unsigned char *salt, int saltlen);
13803   X509_ALGOR *PKCS5_pbe_set_ex(int alg, int iter,
13804                                const unsigned char *salt, int saltlen,
13805                                OSSL_LIB_CTX *libctx);
13806   
13807   X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,
13808                              unsigned char *salt, int saltlen);
13809   X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
13810                                 unsigned char *salt, int saltlen,
13811                                 unsigned char *aiv, int prf_nid);
13812   X509_ALGOR *PKCS5_pbe2_set_iv_ex(const EVP_CIPHER *cipher, int iter,
13813                                    unsigned char *salt, int saltlen,
13814                                    unsigned char *aiv, int prf_nid,
13815                                    OSSL_LIB_CTX *libctx);
13816   
13817   
13818   X509_ALGOR *PKCS5_pbe2_set_scrypt(const EVP_CIPHER *cipher,
13819                                     const unsigned char *salt, int saltlen,
13820                                     unsigned char *aiv, uint64_t N, uint64_t r,
13821                                     uint64_t p);
13822   
13823   
13824   X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen,
13825                                int prf_nid, int keylen);
13826   X509_ALGOR *PKCS5_pbkdf2_set_ex(int iter, unsigned char *salt, int saltlen,
13827                                   int prf_nid, int keylen,
13828                                   OSSL_LIB_CTX *libctx);
13829   
13830   
13831   
13832   extern PKCS8_PRIV_KEY_INFO *PKCS8_PRIV_KEY_INFO_new(void); extern void PKCS8_PRIV_KEY_INFO_free(PKCS8_PRIV_KEY_INFO *a); extern PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO(PKCS8_PRIV_KEY_INFO **a, const unsigned char **in, long len); extern int i2d_PKCS8_PRIV_KEY_INFO(const PKCS8_PRIV_KEY_INFO *a, unsigned char **out); extern const ASN1_ITEM * PKCS8_PRIV_KEY_INFO_it(void);
13833   
13834   EVP_PKEY *EVP_PKCS82PKEY(const PKCS8_PRIV_KEY_INFO *p8);
13835   EVP_PKEY *EVP_PKCS82PKEY_ex(const PKCS8_PRIV_KEY_INFO *p8, OSSL_LIB_CTX *libctx,
13836                               const char *propq);
13837   PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(const EVP_PKEY *pkey);
13838   
13839   int PKCS8_pkey_set0(PKCS8_PRIV_KEY_INFO *priv, ASN1_OBJECT *aobj,
13840                       int version, int ptype, void *pval,
13841                       unsigned char *penc, int penclen);
13842   int PKCS8_pkey_get0(const ASN1_OBJECT **ppkalg,
13843                       const unsigned char **pk, int *ppklen,
13844                       const X509_ALGOR **pa, const PKCS8_PRIV_KEY_INFO *p8);
13845   
13846   const struct stack_st_X509_ATTRIBUTE *
13847   PKCS8_pkey_get0_attrs(const PKCS8_PRIV_KEY_INFO *p8);
13848   int PKCS8_pkey_add1_attr(PKCS8_PRIV_KEY_INFO *p8, X509_ATTRIBUTE *attr);
13849   int PKCS8_pkey_add1_attr_by_NID(PKCS8_PRIV_KEY_INFO *p8, int nid, int type,
13850                                   const unsigned char *bytes, int len);
13851   int PKCS8_pkey_add1_attr_by_OBJ(PKCS8_PRIV_KEY_INFO *p8, const ASN1_OBJECT *obj,
13852                                   int type, const unsigned char *bytes, int len);
13853   
13854   
13855   void X509_PUBKEY_set0_public_key(X509_PUBKEY *pub,
13856                                    unsigned char *penc, int penclen);
13857   int X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj,
13858                              int ptype, void *pval,
13859                              unsigned char *penc, int penclen);
13860   int X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg,
13861                              const unsigned char **pk, int *ppklen,
13862                              X509_ALGOR **pa, const X509_PUBKEY *pub);
13863   int X509_PUBKEY_eq(const X509_PUBKEY *a, const X509_PUBKEY *b);
13864   # 33 "include/openssl/ssl.h" 2
13865   
13866   
13867   
13868   
13869   # 1 "include/openssl/pem.h" 1
13870   # 12 "include/openssl/pem.h"
13871           
13872   # 24 "include/openssl/pem.h"
13873   # 1 "include/openssl/pemerr.h" 1
13874   # 13 "include/openssl/pemerr.h"
13875           
13876   # 25 "include/openssl/pem.h" 2
13877   # 373 "include/openssl/pem.h"
13878   int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher);
13879   int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *len,
13880                     pem_password_cb *callback, void *u);
13881   
13882   int PEM_read_bio(BIO *bp, char **name, char **header,
13883                    unsigned char **data, long *len);
13884   
13885   
13886   
13887   int PEM_read_bio_ex(BIO *bp, char **name, char **header,
13888                       unsigned char **data, long *len, unsigned int flags);
13889   int PEM_bytes_read_bio_secmem(unsigned char **pdata, long *plen, char **pnm,
13890                                 const char *name, BIO *bp, pem_password_cb *cb,
13891                                 void *u);
13892   int PEM_write_bio(BIO *bp, const char *name, const char *hdr,
13893                     const unsigned char *data, long len);
13894   int PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm,
13895                          const char *name, BIO *bp, pem_password_cb *cb,
13896                          void *u);
13897   void *PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, void **x,
13898                           pem_password_cb *cb, void *u);
13899   int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp,
13900                          const void *x, const EVP_CIPHER *enc,
13901                          const unsigned char *kstr, int klen,
13902                          pem_password_cb *cb, void *u);
13903   
13904   struct stack_st_X509_INFO *PEM_X509_INFO_read_bio(BIO *bp, struct stack_st_X509_INFO *sk,
13905                                               pem_password_cb *cb, void *u);
13906   struct stack_st_X509_INFO
13907   *PEM_X509_INFO_read_bio_ex(BIO *bp, struct stack_st_X509_INFO *sk,
13908                              pem_password_cb *cb, void *u, OSSL_LIB_CTX *libctx,
13909                              const char *propq);
13910   
13911   int PEM_X509_INFO_write_bio(BIO *bp, const X509_INFO *xi, EVP_CIPHER *enc,
13912                               const unsigned char *kstr, int klen,
13913                               pem_password_cb *cd, void *u);
13914   
13915   
13916   int PEM_read(FILE *fp, char **name, char **header,
13917                unsigned char **data, long *len);
13918   int PEM_write(FILE *fp, const char *name, const char *hdr,
13919                 const unsigned char *data, long len);
13920   void *PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x,
13921                       pem_password_cb *cb, void *u);
13922   int PEM_ASN1_write(i2d_of_void *i2d, const char *name, FILE *fp,
13923                      const void *x, const EVP_CIPHER *enc,
13924                      const unsigned char *kstr, int klen,
13925                      pem_password_cb *callback, void *u);
13926   struct stack_st_X509_INFO *PEM_X509_INFO_read(FILE *fp, struct stack_st_X509_INFO *sk,
13927                                           pem_password_cb *cb, void *u);
13928   struct stack_st_X509_INFO
13929   *PEM_X509_INFO_read_ex(FILE *fp, struct stack_st_X509_INFO *sk, pem_password_cb *cb,
13930                          void *u, OSSL_LIB_CTX *libctx, const char *propq);
13931   
13932   
13933   int PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type);
13934   int PEM_SignUpdate(EVP_MD_CTX *ctx, const unsigned char *d, unsigned int cnt);
13935   int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret,
13936                     unsigned int *siglen, EVP_PKEY *pkey);
13937   
13938   
13939   int PEM_def_callback(char *buf, int num, int rwflag, void *userdata);
13940   void PEM_proc_type(char *buf, int type);
13941   void PEM_dek_info(char *buf, const char *type, int len, const char *str);
13942   
13943   
13944   
13945   extern X509 *PEM_read_bio_X509(BIO *out, X509 **x, pem_password_cb *cb, void *u); extern X509 *PEM_read_X509(FILE *out, X509 **x, pem_password_cb *cb, void *u); extern int PEM_write_bio_X509(BIO *out, const X509 *x); extern int PEM_write_X509(FILE *out, const X509 *x);
13946   extern X509 *PEM_read_bio_X509_AUX(BIO *out, X509 **x, pem_password_cb *cb, void *u); extern X509 *PEM_read_X509_AUX(FILE *out, X509 **x, pem_password_cb *cb, void *u); extern int PEM_write_bio_X509_AUX(BIO *out, const X509 *x); extern int PEM_write_X509_AUX(FILE *out, const X509 *x);
13947   extern X509_REQ *PEM_read_bio_X509_REQ(BIO *out, X509_REQ **x, pem_password_cb *cb, void *u); extern X509_REQ *PEM_read_X509_REQ(FILE *out, X509_REQ **x, pem_password_cb *cb, void *u); extern int PEM_write_bio_X509_REQ(BIO *out, const X509_REQ *x); extern int PEM_write_X509_REQ(FILE *out, const X509_REQ *x);
13948   extern int PEM_write_bio_X509_REQ_NEW(BIO *out, const X509_REQ *x); extern int PEM_write_X509_REQ_NEW(FILE *out, const X509_REQ *x);
13949   extern X509_CRL *PEM_read_bio_X509_CRL(BIO *out, X509_CRL **x, pem_password_cb *cb, void *u); extern X509_CRL *PEM_read_X509_CRL(FILE *out, X509_CRL **x, pem_password_cb *cb, void *u); extern int PEM_write_bio_X509_CRL(BIO *out, const X509_CRL *x); extern int PEM_write_X509_CRL(FILE *out, const X509_CRL *x);
13950   extern X509_PUBKEY *PEM_read_bio_X509_PUBKEY(BIO *out, X509_PUBKEY **x, pem_password_cb *cb, void *u); extern X509_PUBKEY *PEM_read_X509_PUBKEY(FILE *out, X509_PUBKEY **x, pem_password_cb *cb, void *u); extern int PEM_write_bio_X509_PUBKEY(BIO *out, const X509_PUBKEY *x); extern int PEM_write_X509_PUBKEY(FILE *out, const X509_PUBKEY *x);
13951   extern PKCS7 *PEM_read_bio_PKCS7(BIO *out, PKCS7 **x, pem_password_cb *cb, void *u); extern PKCS7 *PEM_read_PKCS7(FILE *out, PKCS7 **x, pem_password_cb *cb, void *u); extern int PEM_write_bio_PKCS7(BIO *out, const PKCS7 *x); extern int PEM_write_PKCS7(FILE *out, const PKCS7 *x);
13952   extern NETSCAPE_CERT_SEQUENCE *PEM_read_bio_NETSCAPE_CERT_SEQUENCE(BIO *out, NETSCAPE_CERT_SEQUENCE **x, pem_password_cb *cb, void *u); extern NETSCAPE_CERT_SEQUENCE *PEM_read_NETSCAPE_CERT_SEQUENCE(FILE *out, NETSCAPE_CERT_SEQUENCE **x, pem_password_cb *cb, void *u); extern int PEM_write_bio_NETSCAPE_CERT_SEQUENCE(BIO *out, const NETSCAPE_CERT_SEQUENCE *x); extern int PEM_write_NETSCAPE_CERT_SEQUENCE(FILE *out, const NETSCAPE_CERT_SEQUENCE *x);
13953   extern X509_SIG *PEM_read_bio_PKCS8(BIO *out, X509_SIG **x, pem_password_cb *cb, void *u); extern X509_SIG *PEM_read_PKCS8(FILE *out, X509_SIG **x, pem_password_cb *cb, void *u); extern int PEM_write_bio_PKCS8(BIO *out, const X509_SIG *x); extern int PEM_write_PKCS8(FILE *out, const X509_SIG *x);
13954   extern PKCS8_PRIV_KEY_INFO *PEM_read_bio_PKCS8_PRIV_KEY_INFO(BIO *out, PKCS8_PRIV_KEY_INFO **x, pem_password_cb *cb, void *u); extern PKCS8_PRIV_KEY_INFO *PEM_read_PKCS8_PRIV_KEY_INFO(FILE *out, PKCS8_PRIV_KEY_INFO **x, pem_password_cb *cb, void *u); extern int PEM_write_bio_PKCS8_PRIV_KEY_INFO(BIO *out, const PKCS8_PRIV_KEY_INFO *x); extern int PEM_write_PKCS8_PRIV_KEY_INFO(FILE *out, const PKCS8_PRIV_KEY_INFO *x);
13955   
13956   __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *PEM_read_bio_RSAPrivateKey(BIO *out, RSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *PEM_read_RSAPrivateKey(FILE *out, RSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_RSAPrivateKey(BIO *out, const RSA *x, const EVP_CIPHER *enc, const unsigned char *kstr, int klen, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_RSAPrivateKey(FILE *out, const RSA *x, const EVP_CIPHER *enc, const unsigned char *kstr, int klen, pem_password_cb *cb, void *u);
13957   __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *PEM_read_bio_RSAPublicKey(BIO *out, RSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *PEM_read_RSAPublicKey(FILE *out, RSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_RSAPublicKey(BIO *out, const RSA *x); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_RSAPublicKey(FILE *out, const RSA *x);
13958   __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *PEM_read_bio_RSA_PUBKEY(BIO *out, RSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) RSA *PEM_read_RSA_PUBKEY(FILE *out, RSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_RSA_PUBKEY(BIO *out, const RSA *x); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_RSA_PUBKEY(FILE *out, const RSA *x);
13959   
13960   
13961   
13962   __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *PEM_read_bio_DSAPrivateKey(BIO *out, DSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *PEM_read_DSAPrivateKey(FILE *out, DSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_DSAPrivateKey(BIO *out, const DSA *x, const EVP_CIPHER *enc, const unsigned char *kstr, int klen, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_DSAPrivateKey(FILE *out, const DSA *x, const EVP_CIPHER *enc, const unsigned char *kstr, int klen, pem_password_cb *cb, void *u);
13963   __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *PEM_read_bio_DSA_PUBKEY(BIO *out, DSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *PEM_read_DSA_PUBKEY(FILE *out, DSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_DSA_PUBKEY(BIO *out, const DSA *x); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_DSA_PUBKEY(FILE *out, const DSA *x);
13964   __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *PEM_read_bio_DSAparams(BIO *out, DSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) DSA *PEM_read_DSAparams(FILE *out, DSA **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_DSAparams(BIO *out, const DSA *x); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_DSAparams(FILE *out, const DSA *x);
13965   
13966   
13967   
13968   
13969   
13970   __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_GROUP *PEM_read_bio_ECPKParameters(BIO *out, EC_GROUP **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_GROUP *PEM_read_ECPKParameters(FILE *out, EC_GROUP **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_ECPKParameters(BIO *out, const EC_GROUP *x); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_ECPKParameters(FILE *out, const EC_GROUP *x);
13971   __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *PEM_read_bio_ECPrivateKey(BIO *out, EC_KEY **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *PEM_read_ECPrivateKey(FILE *out, EC_KEY **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_ECPrivateKey(BIO *out, const EC_KEY *x, const EVP_CIPHER *enc, const unsigned char *kstr, int klen, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_ECPrivateKey(FILE *out, const EC_KEY *x, const EVP_CIPHER *enc, const unsigned char *kstr, int klen, pem_password_cb *cb, void *u);
13972   __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *PEM_read_bio_EC_PUBKEY(BIO *out, EC_KEY **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) EC_KEY *PEM_read_EC_PUBKEY(FILE *out, EC_KEY **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_EC_PUBKEY(BIO *out, const EC_KEY *x); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_EC_PUBKEY(FILE *out, const EC_KEY *x);
13973   
13974   
13975   
13976   
13977   
13978   __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *PEM_read_bio_DHparams(BIO *out, DH **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) DH *PEM_read_DHparams(FILE *out, DH **x, pem_password_cb *cb, void *u); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_DHparams(BIO *out, const DH *x); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_DHparams(FILE *out, const DH *x);
13979   __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_bio_DHxparams(BIO *out, const DH *x); __attribute__((deprecated("Since OpenSSL " "3.0"))) int PEM_write_DHxparams(FILE *out, const DH *x);
13980   
13981   
13982   extern EVP_PKEY *PEM_read_bio_PrivateKey(BIO *out, EVP_PKEY **x, pem_password_cb *cb, void *u); extern EVP_PKEY *PEM_read_bio_PrivateKey_ex(BIO *out, EVP_PKEY **x, pem_password_cb *cb, void *u, OSSL_LIB_CTX *libctx, const char *propq); extern EVP_PKEY *PEM_read_PrivateKey(FILE *out, EVP_PKEY **x, pem_password_cb *cb, void *u); extern EVP_PKEY *PEM_read_PrivateKey_ex(FILE *out, EVP_PKEY **x, pem_password_cb *cb, void *u, OSSL_LIB_CTX *libctx, const char *propq); extern int PEM_write_bio_PrivateKey(BIO *out, const EVP_PKEY *x, const EVP_CIPHER *enc, const unsigned char *kstr, int klen, pem_password_cb *cb, void *u); extern int PEM_write_bio_PrivateKey_ex(BIO *out, const EVP_PKEY *x, const EVP_CIPHER *enc, const unsigned char *kstr, int klen, pem_password_cb *cb, void *u, OSSL_LIB_CTX *libctx, const char *propq); extern int PEM_write_PrivateKey(FILE *out, const EVP_PKEY *x, const EVP_CIPHER *enc, const unsigned char *kstr, int klen, pem_password_cb *cb, void *u); extern int PEM_write_PrivateKey_ex(FILE *out, const EVP_PKEY *x, const EVP_CIPHER *enc, const unsigned char *kstr, int klen, pem_password_cb *cb, void *u, OSSL_LIB_CTX *libctx, const char *propq);
13983   extern EVP_PKEY *PEM_read_bio_PUBKEY(BIO *out, EVP_PKEY **x, pem_password_cb *cb, void *u); extern EVP_PKEY *PEM_read_bio_PUBKEY_ex(BIO *out, EVP_PKEY **x, pem_password_cb *cb, void *u, OSSL_LIB_CTX *libctx, const char *propq); extern EVP_PKEY *PEM_read_PUBKEY(FILE *out, EVP_PKEY **x, pem_password_cb *cb, void *u); extern EVP_PKEY *PEM_read_PUBKEY_ex(FILE *out, EVP_PKEY **x, pem_password_cb *cb, void *u, OSSL_LIB_CTX *libctx, const char *propq); extern int PEM_write_bio_PUBKEY(BIO *out, const EVP_PKEY *x); extern int PEM_write_bio_PUBKEY_ex(BIO *out, const EVP_PKEY *x, OSSL_LIB_CTX *libctx, const char *propq); extern int PEM_write_PUBKEY(FILE *out, const EVP_PKEY *x); extern int PEM_write_PUBKEY_ex(FILE *out, const EVP_PKEY *x, OSSL_LIB_CTX *libctx, const char *propq);
13984   
13985   int PEM_write_bio_PrivateKey_traditional(BIO *bp, const EVP_PKEY *x,
13986                                            const EVP_CIPHER *enc,
13987                                            const unsigned char *kstr, int klen,
13988                                            pem_password_cb *cb, void *u);
13989   
13990   
13991   int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, const EVP_PKEY *x, int nid,
13992                                         const char *kstr, int klen,
13993                                         pem_password_cb *cb, void *u);
13994   int PEM_write_bio_PKCS8PrivateKey(BIO *, const EVP_PKEY *, const EVP_CIPHER *,
13995                                     const char *kstr, int klen,
13996                                     pem_password_cb *cb, void *u);
13997   int i2d_PKCS8PrivateKey_bio(BIO *bp, const EVP_PKEY *x, const EVP_CIPHER *enc,
13998                               const char *kstr, int klen,
13999                               pem_password_cb *cb, void *u);
14000   int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, const EVP_PKEY *x, int nid,
14001                                   const char *kstr, int klen,
14002                                   pem_password_cb *cb, void *u);
14003   EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb,
14004                                     void *u);
14005   
14006   
14007   int i2d_PKCS8PrivateKey_fp(FILE *fp, const EVP_PKEY *x, const EVP_CIPHER *enc,
14008                              const char *kstr, int klen,
14009                              pem_password_cb *cb, void *u);
14010   int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, const EVP_PKEY *x, int nid,
14011                                  const char *kstr, int klen,
14012                                  pem_password_cb *cb, void *u);
14013   int PEM_write_PKCS8PrivateKey_nid(FILE *fp, const EVP_PKEY *x, int nid,
14014                                     const char *kstr, int klen,
14015                                     pem_password_cb *cb, void *u);
14016   
14017   EVP_PKEY *d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb,
14018                                    void *u);
14019   
14020   int PEM_write_PKCS8PrivateKey(FILE *fp, const EVP_PKEY *x, const EVP_CIPHER *enc,
14021                                 const char *kstr, int klen,
14022                                 pem_password_cb *cd, void *u);
14023   
14024   EVP_PKEY *PEM_read_bio_Parameters_ex(BIO *bp, EVP_PKEY **x,
14025                                        OSSL_LIB_CTX *libctx, const char *propq);
14026   EVP_PKEY *PEM_read_bio_Parameters(BIO *bp, EVP_PKEY **x);
14027   int PEM_write_bio_Parameters(BIO *bp, const EVP_PKEY *x);
14028   
14029   EVP_PKEY *b2i_PrivateKey(const unsigned char **in, long length);
14030   EVP_PKEY *b2i_PublicKey(const unsigned char **in, long length);
14031   EVP_PKEY *b2i_PrivateKey_bio(BIO *in);
14032   EVP_PKEY *b2i_PublicKey_bio(BIO *in);
14033   int i2b_PrivateKey_bio(BIO *out, const EVP_PKEY *pk);
14034   int i2b_PublicKey_bio(BIO *out, const EVP_PKEY *pk);
14035   EVP_PKEY *b2i_PVK_bio(BIO *in, pem_password_cb *cb, void *u);
14036   EVP_PKEY *b2i_PVK_bio_ex(BIO *in, pem_password_cb *cb, void *u,
14037                            OSSL_LIB_CTX *libctx, const char *propq);
14038   int i2b_PVK_bio(BIO *out, const EVP_PKEY *pk, int enclevel,
14039                   pem_password_cb *cb, void *u);
14040   int i2b_PVK_bio_ex(BIO *out, const EVP_PKEY *pk, int enclevel,
14041                      pem_password_cb *cb, void *u,
14042                      OSSL_LIB_CTX *libctx, const char *propq);
14043   # 38 "include/openssl/ssl.h" 2
14044   # 1 "include/openssl/hmac.h" 1
14045   # 12 "include/openssl/hmac.h"
14046           
14047   # 32 "include/openssl/hmac.h"
14048   __attribute__((deprecated("Since OpenSSL " "3.0"))) size_t HMAC_size(const HMAC_CTX *e);
14049   __attribute__((deprecated("Since OpenSSL " "3.0"))) HMAC_CTX *HMAC_CTX_new(void);
14050   __attribute__((deprecated("Since OpenSSL " "3.0"))) int HMAC_CTX_reset(HMAC_CTX *ctx);
14051   __attribute__((deprecated("Since OpenSSL " "3.0"))) void HMAC_CTX_free(HMAC_CTX *ctx);
14052   
14053   
14054   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) int HMAC_Init(HMAC_CTX *ctx,
14055                                                const void *key, int len,
14056                                                const EVP_MD *md);
14057   
14058   
14059   __attribute__((deprecated("Since OpenSSL " "3.0"))) int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
14060                                          const EVP_MD *md, ENGINE *impl);
14061   __attribute__((deprecated("Since OpenSSL " "3.0"))) int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data,
14062                                         size_t len);
14063   __attribute__((deprecated("Since OpenSSL " "3.0"))) int HMAC_Final(HMAC_CTX *ctx, unsigned char *md,
14064                                        unsigned int *len);
14065   __attribute__((deprecated("Since OpenSSL " "3.0"))) int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx);
14066   __attribute__((deprecated("Since OpenSSL " "3.0"))) void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags);
14067   __attribute__((deprecated("Since OpenSSL " "3.0"))) const EVP_MD *HMAC_CTX_get_md(const HMAC_CTX *ctx);
14068   
14069   
14070   unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
14071                       const unsigned char *data, size_t data_len,
14072                       unsigned char *md, unsigned int *md_len);
14073   # 39 "include/openssl/ssl.h" 2
14074   # 1 "include/openssl/async.h" 1
14075   # 14 "include/openssl/async.h"
14076           
14077   # 31 "include/openssl/async.h"
14078   # 1 "include/openssl/asyncerr.h" 1
14079   # 13 "include/openssl/asyncerr.h"
14080           
14081   # 32 "include/openssl/async.h" 2
14082   
14083   
14084   
14085   
14086   
14087   
14088   typedef struct async_job_st ASYNC_JOB;
14089   typedef struct async_wait_ctx_st ASYNC_WAIT_CTX;
14090   typedef int (*ASYNC_callback_fn)(void *arg);
14091   # 52 "include/openssl/async.h"
14092   int ASYNC_init_thread(size_t max_size, size_t init_size);
14093   void ASYNC_cleanup_thread(void);
14094   
14095   
14096   ASYNC_WAIT_CTX *ASYNC_WAIT_CTX_new(void);
14097   void ASYNC_WAIT_CTX_free(ASYNC_WAIT_CTX *ctx);
14098   int ASYNC_WAIT_CTX_set_wait_fd(ASYNC_WAIT_CTX *ctx, const void *key,
14099                                  int fd,
14100                                  void *custom_data,
14101                                  void (*cleanup)(ASYNC_WAIT_CTX *, const void *,
14102                                                  int, void *));
14103   int ASYNC_WAIT_CTX_get_fd(ASYNC_WAIT_CTX *ctx, const void *key,
14104                           int *fd, void **custom_data);
14105   int ASYNC_WAIT_CTX_get_all_fds(ASYNC_WAIT_CTX *ctx, int *fd,
14106                                  size_t *numfds);
14107   int ASYNC_WAIT_CTX_get_callback(ASYNC_WAIT_CTX *ctx,
14108                                   ASYNC_callback_fn *callback,
14109                                   void **callback_arg);
14110   int ASYNC_WAIT_CTX_set_callback(ASYNC_WAIT_CTX *ctx,
14111                                   ASYNC_callback_fn callback,
14112                                   void *callback_arg);
14113   int ASYNC_WAIT_CTX_set_status(ASYNC_WAIT_CTX *ctx, int status);
14114   int ASYNC_WAIT_CTX_get_status(ASYNC_WAIT_CTX *ctx);
14115   int ASYNC_WAIT_CTX_get_changed_fds(ASYNC_WAIT_CTX *ctx, int *addfd,
14116                                      size_t *numaddfds, int *delfd,
14117                                      size_t *numdelfds);
14118   int ASYNC_WAIT_CTX_clear_fd(ASYNC_WAIT_CTX *ctx, const void *key);
14119   
14120   
14121   int ASYNC_is_capable(void);
14122   
14123   typedef void *(*ASYNC_stack_alloc_fn)(size_t *num);
14124   typedef void (*ASYNC_stack_free_fn)(void *addr);
14125   
14126   int ASYNC_set_mem_functions(ASYNC_stack_alloc_fn alloc_fn,
14127                               ASYNC_stack_free_fn free_fn);
14128   void ASYNC_get_mem_functions(ASYNC_stack_alloc_fn *alloc_fn,
14129                                ASYNC_stack_free_fn *free_fn);
14130   
14131   int ASYNC_start_job(ASYNC_JOB **job, ASYNC_WAIT_CTX *ctx, int *ret,
14132                       int (*func)(void *), void *args, size_t size);
14133   int ASYNC_pause_job(void);
14134   
14135   ASYNC_JOB *ASYNC_get_current_job(void);
14136   ASYNC_WAIT_CTX *ASYNC_get_wait_ctx(ASYNC_JOB *job);
14137   void ASYNC_block_pause(void);
14138   void ASYNC_unblock_pause(void);
14139   # 40 "include/openssl/ssl.h" 2
14140   
14141   
14142   
14143   # 1 "include/openssl/ct.h" 1
14144   # 17 "include/openssl/ct.h"
14145           
14146   # 27 "include/openssl/ct.h"
14147   # 1 "include/openssl/types.h" 1
14148   # 28 "include/openssl/ct.h" 2
14149   
14150   
14151   # 1 "include/openssl/cterr.h" 1
14152   # 13 "include/openssl/cterr.h"
14153           
14154   # 31 "include/openssl/ct.h" 2
14155   # 42 "include/openssl/ct.h"
14156   struct stack_st_SCT; typedef int (*sk_SCT_compfunc)(const SCT * const *a, const SCT *const *b); typedef void (*sk_SCT_freefunc)(SCT *a); typedef SCT * (*sk_SCT_copyfunc)(const SCT *a); static __attribute__((unused)) inline SCT *ossl_check_SCT_type(SCT *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_SCT_sk_type(const struct stack_st_SCT *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_SCT_sk_type(struct stack_st_SCT *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_SCT_compfunc_type(sk_SCT_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_SCT_copyfunc_type(sk_SCT_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_SCT_freefunc_type(sk_SCT_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
14157   # 68 "include/openssl/ct.h"
14158   struct stack_st_CTLOG; typedef int (*sk_CTLOG_compfunc)(const CTLOG * const *a, const CTLOG *const *b); typedef void (*sk_CTLOG_freefunc)(CTLOG *a); typedef CTLOG * (*sk_CTLOG_copyfunc)(const CTLOG *a); static __attribute__((unused)) inline CTLOG *ossl_check_CTLOG_type(CTLOG *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_CTLOG_sk_type(const struct stack_st_CTLOG *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_CTLOG_sk_type(struct stack_st_CTLOG *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_CTLOG_compfunc_type(sk_CTLOG_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_CTLOG_copyfunc_type(sk_CTLOG_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_CTLOG_freefunc_type(sk_CTLOG_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
14159   # 97 "include/openssl/ct.h"
14160   typedef enum {
14161       CT_LOG_ENTRY_TYPE_NOT_SET = -1,
14162       CT_LOG_ENTRY_TYPE_X509 = 0,
14163       CT_LOG_ENTRY_TYPE_PRECERT = 1
14164   } ct_log_entry_type_t;
14165   
14166   typedef enum {
14167       SCT_VERSION_NOT_SET = -1,
14168       SCT_VERSION_V1 = 0
14169   } sct_version_t;
14170   
14171   typedef enum {
14172       SCT_SOURCE_UNKNOWN,
14173       SCT_SOURCE_TLS_EXTENSION,
14174       SCT_SOURCE_X509V3_EXTENSION,
14175       SCT_SOURCE_OCSP_STAPLED_RESPONSE
14176   } sct_source_t;
14177   
14178   typedef enum {
14179       SCT_VALIDATION_STATUS_NOT_SET,
14180       SCT_VALIDATION_STATUS_UNKNOWN_LOG,
14181       SCT_VALIDATION_STATUS_VALID,
14182       SCT_VALIDATION_STATUS_INVALID,
14183       SCT_VALIDATION_STATUS_UNVERIFIED,
14184       SCT_VALIDATION_STATUS_UNKNOWN_VERSION
14185   } sct_validation_status_t;
14186   # 134 "include/openssl/ct.h"
14187   CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new_ex(OSSL_LIB_CTX *libctx,
14188                                                 const char *propq);
14189   
14190   
14191   
14192   
14193   
14194   CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new(void);
14195   
14196   
14197   void CT_POLICY_EVAL_CTX_free(CT_POLICY_EVAL_CTX *ctx);
14198   
14199   
14200   X509* CT_POLICY_EVAL_CTX_get0_cert(const CT_POLICY_EVAL_CTX *ctx);
14201   
14202   
14203   
14204   
14205   
14206   
14207   int CT_POLICY_EVAL_CTX_set1_cert(CT_POLICY_EVAL_CTX *ctx, X509 *cert);
14208   
14209   
14210   X509* CT_POLICY_EVAL_CTX_get0_issuer(const CT_POLICY_EVAL_CTX *ctx);
14211   
14212   
14213   
14214   
14215   
14216   
14217   int CT_POLICY_EVAL_CTX_set1_issuer(CT_POLICY_EVAL_CTX *ctx, X509 *issuer);
14218   
14219   
14220   const CTLOG_STORE *CT_POLICY_EVAL_CTX_get0_log_store(const CT_POLICY_EVAL_CTX *ctx);
14221   
14222   
14223   void CT_POLICY_EVAL_CTX_set_shared_CTLOG_STORE(CT_POLICY_EVAL_CTX *ctx,
14224                                                  CTLOG_STORE *log_store);
14225   
14226   
14227   
14228   
14229   
14230   
14231   uint64_t CT_POLICY_EVAL_CTX_get_time(const CT_POLICY_EVAL_CTX *ctx);
14232   
14233   
14234   
14235   
14236   
14237   
14238   
14239   void CT_POLICY_EVAL_CTX_set_time(CT_POLICY_EVAL_CTX *ctx, uint64_t time_in_ms);
14240   # 196 "include/openssl/ct.h"
14241   SCT *SCT_new(void);
14242   
14243   
14244   
14245   
14246   
14247   SCT *SCT_new_from_base64(unsigned char version,
14248                            const char *logid_base64,
14249                            ct_log_entry_type_t entry_type,
14250                            uint64_t timestamp,
14251                            const char *extensions_base64,
14252                            const char *signature_base64);
14253   
14254   
14255   
14256   
14257   void SCT_free(SCT *sct);
14258   
14259   
14260   
14261   
14262   
14263   void SCT_LIST_free(struct stack_st_SCT *a);
14264   
14265   
14266   
14267   
14268   sct_version_t SCT_get_version(const SCT *sct);
14269   
14270   
14271   
14272   
14273   
14274    int SCT_set_version(SCT *sct, sct_version_t version);
14275   
14276   
14277   
14278   
14279   ct_log_entry_type_t SCT_get_log_entry_type(const SCT *sct);
14280   
14281   
14282   
14283   
14284   
14285    int SCT_set_log_entry_type(SCT *sct, ct_log_entry_type_t entry_type);
14286   
14287   
14288   
14289   
14290   
14291   
14292   size_t SCT_get0_log_id(const SCT *sct, unsigned char **log_id);
14293   
14294   
14295   
14296   
14297   
14298   
14299    int SCT_set0_log_id(SCT *sct, unsigned char *log_id, size_t log_id_len);
14300   
14301   
14302   
14303   
14304   
14305   
14306    int SCT_set1_log_id(SCT *sct, const unsigned char *log_id,
14307                              size_t log_id_len);
14308   
14309   
14310   
14311   
14312   uint64_t SCT_get_timestamp(const SCT *sct);
14313   
14314   
14315   
14316   
14317   void SCT_set_timestamp(SCT *sct, uint64_t timestamp);
14318   
14319   
14320   
14321   
14322   
14323   
14324   int SCT_get_signature_nid(const SCT *sct);
14325   
14326   
14327   
14328   
14329   
14330   
14331   
14332    int SCT_set_signature_nid(SCT *sct, int nid);
14333   
14334   
14335   
14336   
14337   
14338   
14339   size_t SCT_get0_extensions(const SCT *sct, unsigned char **ext);
14340   
14341   
14342   
14343   
14344   
14345   void SCT_set0_extensions(SCT *sct, unsigned char *ext, size_t ext_len);
14346   
14347   
14348   
14349   
14350   
14351   
14352    int SCT_set1_extensions(SCT *sct, const unsigned char *ext,
14353                                  size_t ext_len);
14354   
14355   
14356   
14357   
14358   
14359   
14360   size_t SCT_get0_signature(const SCT *sct, unsigned char **sig);
14361   
14362   
14363   
14364   
14365   
14366   void SCT_set0_signature(SCT *sct, unsigned char *sig, size_t sig_len);
14367   
14368   
14369   
14370   
14371   
14372    int SCT_set1_signature(SCT *sct, const unsigned char *sig,
14373                                 size_t sig_len);
14374   
14375   
14376   
14377   
14378   sct_source_t SCT_get_source(const SCT *sct);
14379   
14380   
14381   
14382   
14383   
14384    int SCT_set_source(SCT *sct, sct_source_t source);
14385   
14386   
14387   
14388   
14389   const char *SCT_validation_status_string(const SCT *sct);
14390   
14391   
14392   
14393   
14394   
14395   
14396   
14397   void SCT_print(const SCT *sct, BIO *out, int indent, const CTLOG_STORE *logs);
14398   # 361 "include/openssl/ct.h"
14399   void SCT_LIST_print(const struct stack_st_SCT *sct_list, BIO *out, int indent,
14400                       const char *separator, const CTLOG_STORE *logs);
14401   
14402   
14403   
14404   
14405   
14406   sct_validation_status_t SCT_get_validation_status(const SCT *sct);
14407   # 377 "include/openssl/ct.h"
14408    int SCT_validate(SCT *sct, const CT_POLICY_EVAL_CTX *ctx);
14409   # 386 "include/openssl/ct.h"
14410    int SCT_LIST_validate(const struct stack_st_SCT *scts,
14411                                CT_POLICY_EVAL_CTX *ctx);
14412   # 406 "include/openssl/ct.h"
14413    int i2o_SCT_LIST(const struct stack_st_SCT *a, unsigned char **pp);
14414   # 418 "include/openssl/ct.h"
14415   struct stack_st_SCT *o2i_SCT_LIST(struct stack_st_SCT **a, const unsigned char **pp,
14416                               size_t len);
14417   # 433 "include/openssl/ct.h"
14418    int i2d_SCT_LIST(const struct stack_st_SCT *a, unsigned char **pp);
14419   # 445 "include/openssl/ct.h"
14420   struct stack_st_SCT *d2i_SCT_LIST(struct stack_st_SCT **a, const unsigned char **pp,
14421                               long len);
14422   # 457 "include/openssl/ct.h"
14423    int i2o_SCT(const SCT *sct, unsigned char **out);
14424   # 470 "include/openssl/ct.h"
14425   SCT *o2i_SCT(SCT **psct, const unsigned char **in, size_t len);
14426   # 484 "include/openssl/ct.h"
14427   CTLOG *CTLOG_new_ex(EVP_PKEY *public_key, const char *name, OSSL_LIB_CTX *libctx,
14428                       const char *propq);
14429   
14430   
14431   
14432   
14433   
14434   CTLOG *CTLOG_new(EVP_PKEY *public_key, const char *name);
14435   # 501 "include/openssl/ct.h"
14436   int CTLOG_new_from_base64_ex(CTLOG **ct_log, const char *pkey_base64,
14437                                const char *name, OSSL_LIB_CTX *libctx,
14438                                const char *propq);
14439   
14440   
14441   
14442   
14443   
14444   
14445   int CTLOG_new_from_base64(CTLOG ** ct_log,
14446                             const char *pkey_base64, const char *name);
14447   
14448   
14449   
14450   
14451   void CTLOG_free(CTLOG *log);
14452   
14453   
14454   const char *CTLOG_get0_name(const CTLOG *log);
14455   
14456   void CTLOG_get0_log_id(const CTLOG *log, const uint8_t **log_id,
14457                          size_t *log_id_len);
14458   
14459   EVP_PKEY *CTLOG_get0_public_key(const CTLOG *log);
14460   # 535 "include/openssl/ct.h"
14461   CTLOG_STORE *CTLOG_STORE_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
14462   
14463   
14464   
14465   
14466   
14467   
14468   CTLOG_STORE *CTLOG_STORE_new(void);
14469   
14470   
14471   
14472   
14473   void CTLOG_STORE_free(CTLOG_STORE *store);
14474   
14475   
14476   
14477   
14478   
14479   const CTLOG *CTLOG_STORE_get0_log_by_id(const CTLOG_STORE *store,
14480                                           const uint8_t *log_id,
14481                                           size_t log_id_len);
14482   
14483   
14484   
14485   
14486   
14487    int CTLOG_STORE_load_file(CTLOG_STORE *store, const char *file);
14488   
14489   
14490   
14491   
14492   
14493    int CTLOG_STORE_load_default_file(CTLOG_STORE *store);
14494   # 44 "include/openssl/ssl.h" 2
14495   # 1 "include/openssl/sslerr.h" 1
14496   # 13 "include/openssl/sslerr.h"
14497           
14498   
14499   
14500   
14501   # 1 "include/openssl/sslerr_legacy.h" 1
14502   # 19 "include/openssl/sslerr_legacy.h"
14503           
14504   # 29 "include/openssl/sslerr_legacy.h"
14505   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ERR_load_SSL_strings(void);
14506   # 18 "include/openssl/sslerr.h" 2
14507   # 45 "include/openssl/ssl.h" 2
14508   # 1 "include/openssl/prov_ssl.h" 1
14509   # 12 "include/openssl/prov_ssl.h"
14510           
14511   # 46 "include/openssl/ssl.h" 2
14512   # 231 "include/openssl/ssl.h"
14513   typedef struct ssl_st *ssl_crock_st;
14514   typedef struct tls_session_ticket_ext_st TLS_SESSION_TICKET_EXT;
14515   typedef struct ssl_method_st SSL_METHOD;
14516   typedef struct ssl_cipher_st SSL_CIPHER;
14517   typedef struct ssl_session_st SSL_SESSION;
14518   typedef struct tls_sigalgs_st TLS_SIGALGS;
14519   typedef struct ssl_conf_ctx_st SSL_CONF_CTX;
14520   typedef struct ssl_comp_st SSL_COMP;
14521   
14522   struct stack_st_SSL_CIPHER;
14523   struct stack_st_SSL_COMP;
14524   
14525   
14526   typedef struct srtp_protection_profile_st {
14527       const char *name;
14528       unsigned long id;
14529   } SRTP_PROTECTION_PROFILE;
14530   struct stack_st_SRTP_PROTECTION_PROFILE; typedef int (*sk_SRTP_PROTECTION_PROFILE_compfunc)(const SRTP_PROTECTION_PROFILE * const *a, const SRTP_PROTECTION_PROFILE *const *b); typedef void (*sk_SRTP_PROTECTION_PROFILE_freefunc)(SRTP_PROTECTION_PROFILE *a); typedef SRTP_PROTECTION_PROFILE * (*sk_SRTP_PROTECTION_PROFILE_copyfunc)(const SRTP_PROTECTION_PROFILE *a); static __attribute__((unused)) inline SRTP_PROTECTION_PROFILE *ossl_check_SRTP_PROTECTION_PROFILE_type(SRTP_PROTECTION_PROFILE *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_SRTP_PROTECTION_PROFILE_sk_type(const struct stack_st_SRTP_PROTECTION_PROFILE *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_SRTP_PROTECTION_PROFILE_sk_type(struct stack_st_SRTP_PROTECTION_PROFILE *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_SRTP_PROTECTION_PROFILE_compfunc_type(sk_SRTP_PROTECTION_PROFILE_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_SRTP_PROTECTION_PROFILE_copyfunc_type(sk_SRTP_PROTECTION_PROFILE_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_SRTP_PROTECTION_PROFILE_freefunc_type(sk_SRTP_PROTECTION_PROFILE_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
14531   # 277 "include/openssl/ssl.h"
14532   typedef int (*tls_session_ticket_ext_cb_fn)(SSL *s, const unsigned char *data,
14533                                               int len, void *arg);
14534   typedef int (*tls_session_secret_cb_fn)(SSL *s, void *secret, int *secret_len,
14535                                           struct stack_st_SSL_CIPHER *peer_ciphers,
14536                                           const SSL_CIPHER **cipher, void *arg);
14537   # 313 "include/openssl/ssl.h"
14538   typedef int (*custom_ext_add_cb)(SSL *s, unsigned int ext_type,
14539                                    const unsigned char **out, size_t *outlen,
14540                                    int *al, void *add_arg);
14541   
14542   typedef void (*custom_ext_free_cb)(SSL *s, unsigned int ext_type,
14543                                      const unsigned char *out, void *add_arg);
14544   
14545   typedef int (*custom_ext_parse_cb)(SSL *s, unsigned int ext_type,
14546                                      const unsigned char *in, size_t inlen,
14547                                      int *al, void *parse_arg);
14548   
14549   
14550   typedef int (*SSL_custom_ext_add_cb_ex)(SSL *s, unsigned int ext_type,
14551                                           unsigned int context,
14552                                           const unsigned char **out,
14553                                           size_t *outlen, X509 *x,
14554                                           size_t chainidx,
14555                                           int *al, void *add_arg);
14556   
14557   typedef void (*SSL_custom_ext_free_cb_ex)(SSL *s, unsigned int ext_type,
14558                                             unsigned int context,
14559                                             const unsigned char *out,
14560                                             void *add_arg);
14561   
14562   typedef int (*SSL_custom_ext_parse_cb_ex)(SSL *s, unsigned int ext_type,
14563                                             unsigned int context,
14564                                             const unsigned char *in,
14565                                             size_t inlen, X509 *x,
14566                                             size_t chainidx,
14567                                             int *al, void *parse_arg);
14568   
14569   
14570   typedef int (*SSL_verify_cb)(int preverify_ok, X509_STORE_CTX *x509_ctx);
14571   
14572   
14573   typedef int (*SSL_async_callback_fn)(SSL *s, void *arg);
14574   # 623 "include/openssl/ssl.h"
14575   uint64_t SSL_CTX_get_options(const SSL_CTX *ctx);
14576   uint64_t SSL_get_options(const SSL *s);
14577   uint64_t SSL_CTX_clear_options(SSL_CTX *ctx, uint64_t op);
14578   uint64_t SSL_clear_options(SSL *s, uint64_t op);
14579   uint64_t SSL_CTX_set_options(SSL_CTX *ctx, uint64_t op);
14580   uint64_t SSL_set_options(SSL *s, uint64_t op);
14581   # 661 "include/openssl/ssl.h"
14582   void SSL_CTX_set_msg_callback(SSL_CTX *ctx,
14583                                 void (*cb) (int write_p, int version,
14584                                             int content_type, const void *buf,
14585                                             size_t len, SSL *ssl, void *arg));
14586   void SSL_set_msg_callback(SSL *ssl,
14587                             void (*cb) (int write_p, int version,
14588                                         int content_type, const void *buf,
14589                                         size_t len, SSL *ssl, void *arg));
14590   # 678 "include/openssl/ssl.h"
14591   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SSL_SRP_CTX_init(SSL *s);
14592   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SSL_CTX_SRP_CTX_init(SSL_CTX *ctx);
14593   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SSL_SRP_CTX_free(SSL *ctx);
14594   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SSL_CTX_SRP_CTX_free(SSL_CTX *ctx);
14595   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SSL_srp_server_param_with_username(SSL *s,
14596                                                                       int *ad);
14597   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SRP_Calc_A_param(SSL *s);
14598   # 705 "include/openssl/ssl.h"
14599   typedef int (*GEN_SESSION_CB) (SSL *ssl, unsigned char *id,
14600                                  unsigned int *id_len);
14601   # 720 "include/openssl/ssl.h"
14602   struct lhash_st_SSL_SESSION *SSL_CTX_sessions(SSL_CTX *ctx);
14603   # 746 "include/openssl/ssl.h"
14604   void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx,
14605                                int (*new_session_cb) (struct ssl_st *ssl,
14606                                                       SSL_SESSION *sess));
14607   int (*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx)) (struct ssl_st *ssl,
14608                                                 SSL_SESSION *sess);
14609   void SSL_CTX_sess_set_remove_cb(SSL_CTX *ctx,
14610                                   void (*remove_session_cb) (struct ssl_ctx_st
14611                                                              *ctx,
14612                                                              SSL_SESSION *sess));
14613   void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx)) (struct ssl_ctx_st *ctx,
14614                                                     SSL_SESSION *sess);
14615   void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx,
14616                                SSL_SESSION *(*get_session_cb) (struct ssl_st
14617                                                                *ssl,
14618                                                                const unsigned char
14619                                                                *data, int len,
14620                                                                int *copy));
14621   SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx)) (struct ssl_st *ssl,
14622                                                          const unsigned char *data,
14623                                                          int len, int *copy);
14624   void SSL_CTX_set_info_callback(SSL_CTX *ctx,
14625                                  void (*cb) (const SSL *ssl, int type, int val));
14626   void (*SSL_CTX_get_info_callback(SSL_CTX *ctx)) (const SSL *ssl, int type,
14627                                                    int val);
14628   void SSL_CTX_set_client_cert_cb(SSL_CTX *ctx,
14629                                   int (*client_cert_cb) (SSL *ssl, X509 **x509,
14630                                                          EVP_PKEY **pkey));
14631   int (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx)) (SSL *ssl, X509 **x509,
14632                                                    EVP_PKEY **pkey);
14633   
14634    int SSL_CTX_set_client_cert_engine(SSL_CTX *ctx, ENGINE *e);
14635   
14636   void SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx,
14637                                       int (*app_gen_cookie_cb) (SSL *ssl,
14638                                                                 unsigned char
14639                                                                 *cookie,
14640                                                                 unsigned int
14641                                                                 *cookie_len));
14642   void SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx,
14643                                     int (*app_verify_cookie_cb) (SSL *ssl,
14644                                                                  const unsigned
14645                                                                  char *cookie,
14646                                                                  unsigned int
14647                                                                  cookie_len));
14648   
14649   void SSL_CTX_set_stateless_cookie_generate_cb(
14650       SSL_CTX *ctx,
14651       int (*gen_stateless_cookie_cb) (SSL *ssl,
14652                                       unsigned char *cookie,
14653                                       size_t *cookie_len));
14654   void SSL_CTX_set_stateless_cookie_verify_cb(
14655       SSL_CTX *ctx,
14656       int (*verify_stateless_cookie_cb) (SSL *ssl,
14657                                          const unsigned char *cookie,
14658                                          size_t cookie_len));
14659   
14660   
14661   typedef int (*SSL_CTX_npn_advertised_cb_func)(SSL *ssl,
14662                                                 const unsigned char **out,
14663                                                 unsigned int *outlen,
14664                                                 void *arg);
14665   void SSL_CTX_set_next_protos_advertised_cb(SSL_CTX *s,
14666                                              SSL_CTX_npn_advertised_cb_func cb,
14667                                              void *arg);
14668   
14669   
14670   typedef int (*SSL_CTX_npn_select_cb_func)(SSL *s,
14671                                             unsigned char **out,
14672                                             unsigned char *outlen,
14673                                             const unsigned char *in,
14674                                             unsigned int inlen,
14675                                             void *arg);
14676   void SSL_CTX_set_next_proto_select_cb(SSL_CTX *s,
14677                                         SSL_CTX_npn_select_cb_func cb,
14678                                         void *arg);
14679   
14680   
14681   void SSL_get0_next_proto_negotiated(const SSL *s, const unsigned char **data,
14682                                       unsigned *len);
14683   
14684   
14685   
14686    int SSL_select_next_proto(unsigned char **out, unsigned char *outlen,
14687                                    const unsigned char *in, unsigned int inlen,
14688                                    const unsigned char *client,
14689                                    unsigned int client_len);
14690   
14691   
14692   
14693   
14694   
14695    int SSL_CTX_set_alpn_protos(SSL_CTX *ctx, const unsigned char *protos,
14696                                      unsigned int protos_len);
14697    int SSL_set_alpn_protos(SSL *ssl, const unsigned char *protos,
14698                                  unsigned int protos_len);
14699   typedef int (*SSL_CTX_alpn_select_cb_func)(SSL *ssl,
14700                                              const unsigned char **out,
14701                                              unsigned char *outlen,
14702                                              const unsigned char *in,
14703                                              unsigned int inlen,
14704                                              void *arg);
14705   void SSL_CTX_set_alpn_select_cb(SSL_CTX *ctx,
14706                                   SSL_CTX_alpn_select_cb_func cb,
14707                                   void *arg);
14708   void SSL_get0_alpn_selected(const SSL *ssl, const unsigned char **data,
14709                               unsigned int *len);
14710   # 860 "include/openssl/ssl.h"
14711   typedef unsigned int (*SSL_psk_client_cb_func)(SSL *ssl,
14712                                                  const char *hint,
14713                                                  char *identity,
14714                                                  unsigned int max_identity_len,
14715                                                  unsigned char *psk,
14716                                                  unsigned int max_psk_len);
14717   void SSL_CTX_set_psk_client_callback(SSL_CTX *ctx, SSL_psk_client_cb_func cb);
14718   void SSL_set_psk_client_callback(SSL *ssl, SSL_psk_client_cb_func cb);
14719   
14720   typedef unsigned int (*SSL_psk_server_cb_func)(SSL *ssl,
14721                                                  const char *identity,
14722                                                  unsigned char *psk,
14723                                                  unsigned int max_psk_len);
14724   void SSL_CTX_set_psk_server_callback(SSL_CTX *ctx, SSL_psk_server_cb_func cb);
14725   void SSL_set_psk_server_callback(SSL *ssl, SSL_psk_server_cb_func cb);
14726   
14727    int SSL_CTX_use_psk_identity_hint(SSL_CTX *ctx, const char *identity_hint);
14728    int SSL_use_psk_identity_hint(SSL *s, const char *identity_hint);
14729   const char *SSL_get_psk_identity_hint(const SSL *s);
14730   const char *SSL_get_psk_identity(const SSL *s);
14731   
14732   
14733   typedef int (*SSL_psk_find_session_cb_func)(SSL *ssl,
14734                                               const unsigned char *identity,
14735                                               size_t identity_len,
14736                                               SSL_SESSION **sess);
14737   typedef int (*SSL_psk_use_session_cb_func)(SSL *ssl, const EVP_MD *md,
14738                                              const unsigned char **id,
14739                                              size_t *idlen,
14740                                              SSL_SESSION **sess);
14741   
14742   void SSL_set_psk_find_session_callback(SSL *s, SSL_psk_find_session_cb_func cb);
14743   void SSL_CTX_set_psk_find_session_callback(SSL_CTX *ctx,
14744                                              SSL_psk_find_session_cb_func cb);
14745   void SSL_set_psk_use_session_callback(SSL *s, SSL_psk_use_session_cb_func cb);
14746   void SSL_CTX_set_psk_use_session_callback(SSL_CTX *ctx,
14747                                             SSL_psk_use_session_cb_func cb);
14748   
14749   
14750   
14751    int SSL_CTX_has_client_custom_ext(const SSL_CTX *ctx,
14752                                            unsigned int ext_type);
14753   
14754    int SSL_CTX_add_client_custom_ext(SSL_CTX *ctx,
14755                                            unsigned int ext_type,
14756                                            custom_ext_add_cb add_cb,
14757                                            custom_ext_free_cb free_cb,
14758                                            void *add_arg,
14759                                            custom_ext_parse_cb parse_cb,
14760                                            void *parse_arg);
14761   
14762    int SSL_CTX_add_server_custom_ext(SSL_CTX *ctx,
14763                                            unsigned int ext_type,
14764                                            custom_ext_add_cb add_cb,
14765                                            custom_ext_free_cb free_cb,
14766                                            void *add_arg,
14767                                            custom_ext_parse_cb parse_cb,
14768                                            void *parse_arg);
14769   
14770    int SSL_CTX_add_custom_ext(SSL_CTX *ctx, unsigned int ext_type,
14771                                     unsigned int context,
14772                                     SSL_custom_ext_add_cb_ex add_cb,
14773                                     SSL_custom_ext_free_cb_ex free_cb,
14774                                     void *add_arg,
14775                                     SSL_custom_ext_parse_cb_ex parse_cb,
14776                                     void *parse_arg);
14777   
14778    int SSL_extension_supported(unsigned int ext_type);
14779   # 957 "include/openssl/ssl.h"
14780   typedef void (*SSL_CTX_keylog_cb_func)(const SSL *ssl, const char *line);
14781   
14782   
14783   
14784   
14785   
14786   
14787   void SSL_CTX_set_keylog_callback(SSL_CTX *ctx, SSL_CTX_keylog_cb_func cb);
14788   
14789   
14790   
14791   
14792   
14793   SSL_CTX_keylog_cb_func SSL_CTX_get_keylog_callback(const SSL_CTX *ctx);
14794   
14795   int SSL_CTX_set_max_early_data(SSL_CTX *ctx, uint32_t max_early_data);
14796   uint32_t SSL_CTX_get_max_early_data(const SSL_CTX *ctx);
14797   int SSL_set_max_early_data(SSL *s, uint32_t max_early_data);
14798   uint32_t SSL_get_max_early_data(const SSL *s);
14799   int SSL_CTX_set_recv_max_early_data(SSL_CTX *ctx, uint32_t recv_max_early_data);
14800   uint32_t SSL_CTX_get_recv_max_early_data(const SSL_CTX *ctx);
14801   int SSL_set_recv_max_early_data(SSL *s, uint32_t recv_max_early_data);
14802   uint32_t SSL_get_recv_max_early_data(const SSL *s);
14803   
14804   
14805   
14806   
14807   
14808   # 1 "include/openssl/ssl2.h" 1
14809   # 12 "include/openssl/ssl2.h"
14810           
14811   # 986 "include/openssl/ssl.h" 2
14812   # 1 "include/openssl/ssl3.h" 1
14813   # 13 "include/openssl/ssl3.h"
14814           
14815   # 987 "include/openssl/ssl.h" 2
14816   # 1 "include/openssl/tls1.h" 1
14817   # 14 "include/openssl/tls1.h"
14818           
14819   # 244 "include/openssl/tls1.h"
14820   int SSL_CTX_set_tlsext_max_fragment_length(SSL_CTX *ctx, uint8_t mode);
14821   int SSL_set_tlsext_max_fragment_length(SSL *ssl, uint8_t mode);
14822   
14823   
14824   
14825    const char *SSL_get_servername(const SSL *s, const int type);
14826    int SSL_get_servername_type(const SSL *s);
14827   
14828   
14829   
14830   
14831   
14832   
14833   
14834    int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,
14835                                         const char *label, size_t llen,
14836                                         const unsigned char *context,
14837                                         size_t contextlen, int use_context);
14838   # 270 "include/openssl/tls1.h"
14839    int SSL_export_keying_material_early(SSL *s, unsigned char *out,
14840                                               size_t olen, const char *label,
14841                                               size_t llen,
14842                                               const unsigned char *context,
14843                                               size_t contextlen);
14844   
14845   int SSL_get_peer_signature_type_nid(const SSL *s, int *pnid);
14846   int SSL_get_signature_type_nid(const SSL *s, int *pnid);
14847   
14848   int SSL_get_sigalgs(SSL *s, int idx,
14849                       int *psign, int *phash, int *psignandhash,
14850                       unsigned char *rsig, unsigned char *rhash);
14851   
14852   int SSL_get_shared_sigalgs(SSL *s, int idx,
14853                              int *psign, int *phash, int *psignandhash,
14854                              unsigned char *rsig, unsigned char *rhash);
14855   
14856    int SSL_check_chain(SSL *s, X509 *x, EVP_PKEY *pk, struct stack_st_X509 *chain);
14857   # 363 "include/openssl/tls1.h"
14858   int SSL_CTX_set_tlsext_ticket_key_evp_cb
14859       (SSL_CTX *ctx, int (*fp)(SSL *, unsigned char *, unsigned char *,
14860                                EVP_CIPHER_CTX *, EVP_MAC_CTX *, int));
14861   # 1202 "include/openssl/tls1.h"
14862   struct tls_session_ticket_ext_st {
14863       unsigned short length;
14864       void *data;
14865   };
14866   # 988 "include/openssl/ssl.h" 2
14867   # 1 "include/openssl/dtls1.h" 1
14868   # 12 "include/openssl/dtls1.h"
14869           
14870   # 989 "include/openssl/ssl.h" 2
14871   # 1 "include/openssl/srtp.h" 1
14872   # 18 "include/openssl/srtp.h"
14873           
14874   # 56 "include/openssl/srtp.h"
14875    int SSL_CTX_set_tlsext_use_srtp(SSL_CTX *ctx, const char *profiles);
14876    int SSL_set_tlsext_use_srtp(SSL *ssl, const char *profiles);
14877   
14878    struct stack_st_SRTP_PROTECTION_PROFILE *SSL_get_srtp_profiles(SSL *ssl);
14879    SRTP_PROTECTION_PROFILE *SSL_get_selected_srtp_profile(SSL *s);
14880   # 990 "include/openssl/ssl.h" 2
14881   # 1 "include/openssl/quic.h" 1
14882   # 12 "include/openssl/quic.h"
14883           
14884   # 26 "include/openssl/quic.h"
14885    const SSL_METHOD *OSSL_QUIC_client_method(void);
14886   
14887   
14888   
14889   
14890    const SSL_METHOD *OSSL_QUIC_client_thread_method(void);
14891   # 991 "include/openssl/ssl.h" 2
14892   # 1000 "include/openssl/ssl.h"
14893   struct stack_st_SSL_CIPHER; typedef int (*sk_SSL_CIPHER_compfunc)(const SSL_CIPHER * const *a, const SSL_CIPHER *const *b); typedef void (*sk_SSL_CIPHER_freefunc)(SSL_CIPHER *a); typedef SSL_CIPHER * (*sk_SSL_CIPHER_copyfunc)(const SSL_CIPHER *a); static __attribute__((unused)) inline const SSL_CIPHER *ossl_check_SSL_CIPHER_type(const SSL_CIPHER *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_SSL_CIPHER_sk_type(const struct stack_st_SSL_CIPHER *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_SSL_CIPHER_sk_type(struct stack_st_SSL_CIPHER *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_SSL_CIPHER_compfunc_type(sk_SSL_CIPHER_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_SSL_CIPHER_copyfunc_type(sk_SSL_CIPHER_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_SSL_CIPHER_freefunc_type(sk_SSL_CIPHER_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
14894   # 1026 "include/openssl/ssl.h"
14895   struct stack_st_SSL_COMP; typedef int (*sk_SSL_COMP_compfunc)(const SSL_COMP * const *a, const SSL_COMP *const *b); typedef void (*sk_SSL_COMP_freefunc)(SSL_COMP *a); typedef SSL_COMP * (*sk_SSL_COMP_copyfunc)(const SSL_COMP *a); static __attribute__((unused)) inline SSL_COMP *ossl_check_SSL_COMP_type(SSL_COMP *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_SSL_COMP_sk_type(const struct stack_st_SSL_COMP *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_SSL_COMP_sk_type(struct stack_st_SSL_COMP *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_SSL_COMP_compfunc_type(sk_SSL_COMP_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_SSL_COMP_copyfunc_type(sk_SSL_COMP_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_SSL_COMP_freefunc_type(sk_SSL_COMP_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
14896   # 1064 "include/openssl/ssl.h"
14897   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) void SSL_set_debug(SSL *s, int debug);
14898   # 1086 "include/openssl/ssl.h"
14899   typedef enum {
14900       TLS_ST_BEFORE,
14901       TLS_ST_OK,
14902       DTLS_ST_CR_HELLO_VERIFY_REQUEST,
14903       TLS_ST_CR_SRVR_HELLO,
14904       TLS_ST_CR_CERT,
14905       TLS_ST_CR_COMP_CERT,
14906       TLS_ST_CR_CERT_STATUS,
14907       TLS_ST_CR_KEY_EXCH,
14908       TLS_ST_CR_CERT_REQ,
14909       TLS_ST_CR_SRVR_DONE,
14910       TLS_ST_CR_SESSION_TICKET,
14911       TLS_ST_CR_CHANGE,
14912       TLS_ST_CR_FINISHED,
14913       TLS_ST_CW_CLNT_HELLO,
14914       TLS_ST_CW_CERT,
14915       TLS_ST_CW_COMP_CERT,
14916       TLS_ST_CW_KEY_EXCH,
14917       TLS_ST_CW_CERT_VRFY,
14918       TLS_ST_CW_CHANGE,
14919       TLS_ST_CW_NEXT_PROTO,
14920       TLS_ST_CW_FINISHED,
14921       TLS_ST_SW_HELLO_REQ,
14922       TLS_ST_SR_CLNT_HELLO,
14923       DTLS_ST_SW_HELLO_VERIFY_REQUEST,
14924       TLS_ST_SW_SRVR_HELLO,
14925       TLS_ST_SW_CERT,
14926       TLS_ST_SW_COMP_CERT,
14927       TLS_ST_SW_KEY_EXCH,
14928       TLS_ST_SW_CERT_REQ,
14929       TLS_ST_SW_SRVR_DONE,
14930       TLS_ST_SR_CERT,
14931       TLS_ST_SR_COMP_CERT,
14932       TLS_ST_SR_KEY_EXCH,
14933       TLS_ST_SR_CERT_VRFY,
14934       TLS_ST_SR_NEXT_PROTO,
14935       TLS_ST_SR_CHANGE,
14936       TLS_ST_SR_FINISHED,
14937       TLS_ST_SW_SESSION_TICKET,
14938       TLS_ST_SW_CERT_STATUS,
14939       TLS_ST_SW_CHANGE,
14940       TLS_ST_SW_FINISHED,
14941       TLS_ST_SW_ENCRYPTED_EXTENSIONS,
14942       TLS_ST_CR_ENCRYPTED_EXTENSIONS,
14943       TLS_ST_CR_CERT_VRFY,
14944       TLS_ST_SW_CERT_VRFY,
14945       TLS_ST_CR_HELLO_REQ,
14946       TLS_ST_SW_KEY_UPDATE,
14947       TLS_ST_CW_KEY_UPDATE,
14948       TLS_ST_SR_KEY_UPDATE,
14949       TLS_ST_CR_KEY_UPDATE,
14950       TLS_ST_EARLY_DATA,
14951       TLS_ST_PENDING_EARLY_DATA_END,
14952       TLS_ST_CW_END_OF_EARLY_DATA,
14953       TLS_ST_SR_END_OF_EARLY_DATA
14954   } OSSL_HANDSHAKE_STATE;
14955   # 1173 "include/openssl/ssl.h"
14956   int SSL_in_init(const SSL *s);
14957   int SSL_in_before(const SSL *s);
14958   int SSL_is_init_finished(const SSL *s);
14959   # 1191 "include/openssl/ssl.h"
14960   size_t SSL_get_finished(const SSL *s, void *buf, size_t count);
14961   size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count);
14962   # 1226 "include/openssl/ssl.h"
14963   extern SSL_SESSION *PEM_read_bio_SSL_SESSION(BIO *out, SSL_SESSION **x, pem_password_cb *cb, void *u); extern SSL_SESSION *PEM_read_SSL_SESSION(FILE *out, SSL_SESSION **x, pem_password_cb *cb, void *u); extern int PEM_write_bio_SSL_SESSION(BIO *out, const SSL_SESSION *x); extern int PEM_write_SSL_SESSION(FILE *out, const SSL_SESSION *x);
14964   # 1582 "include/openssl/ssl.h"
14965   const char *SSL_get0_group_name(SSL *s);
14966   const char *SSL_group_to_name(SSL *s, int id);
14967   
14968   
14969   
14970   
14971   
14972   
14973   
14974   int SSL_set0_tmp_dh_pkey(SSL *s, EVP_PKEY *dhpkey);
14975   int SSL_CTX_set0_tmp_dh_pkey(SSL_CTX *ctx, EVP_PKEY *dhpkey);
14976   # 1626 "include/openssl/ssl.h"
14977    const BIO_METHOD *BIO_f_ssl(void);
14978    BIO *BIO_new_ssl(SSL_CTX *ctx, int client);
14979    BIO *BIO_new_ssl_connect(SSL_CTX *ctx);
14980    BIO *BIO_new_buffer_ssl_connect(SSL_CTX *ctx);
14981    int BIO_ssl_copy_session_id(BIO *to, BIO *from);
14982   void BIO_ssl_shutdown(BIO *ssl_bio);
14983   
14984    int SSL_CTX_set_cipher_list(SSL_CTX *, const char *str);
14985    SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth);
14986    SSL_CTX *SSL_CTX_new_ex(OSSL_LIB_CTX *libctx, const char *propq,
14987                                  const SSL_METHOD *meth);
14988   int SSL_CTX_up_ref(SSL_CTX *ctx);
14989   void SSL_CTX_free(SSL_CTX *);
14990    long SSL_CTX_set_timeout(SSL_CTX *ctx, long t);
14991    long SSL_CTX_get_timeout(const SSL_CTX *ctx);
14992    X509_STORE *SSL_CTX_get_cert_store(const SSL_CTX *);
14993   void SSL_CTX_set_cert_store(SSL_CTX *, X509_STORE *);
14994   void SSL_CTX_set1_cert_store(SSL_CTX *, X509_STORE *);
14995    int SSL_want(const SSL *s);
14996    int SSL_clear(SSL *s);
14997   
14998   void SSL_CTX_flush_sessions(SSL_CTX *ctx, long tm);
14999   
15000    const SSL_CIPHER *SSL_get_current_cipher(const SSL *s);
15001    const SSL_CIPHER *SSL_get_pending_cipher(const SSL *s);
15002    int SSL_CIPHER_get_bits(const SSL_CIPHER *c, int *alg_bits);
15003    const char *SSL_CIPHER_get_version(const SSL_CIPHER *c);
15004    const char *SSL_CIPHER_get_name(const SSL_CIPHER *c);
15005    const char *SSL_CIPHER_standard_name(const SSL_CIPHER *c);
15006    const char *OPENSSL_cipher_name(const char *rfc_name);
15007    uint32_t SSL_CIPHER_get_id(const SSL_CIPHER *c);
15008    uint16_t SSL_CIPHER_get_protocol_id(const SSL_CIPHER *c);
15009    int SSL_CIPHER_get_kx_nid(const SSL_CIPHER *c);
15010    int SSL_CIPHER_get_auth_nid(const SSL_CIPHER *c);
15011    const EVP_MD *SSL_CIPHER_get_handshake_digest(const SSL_CIPHER *c);
15012    int SSL_CIPHER_is_aead(const SSL_CIPHER *c);
15013   
15014    int SSL_get_fd(const SSL *s);
15015    int SSL_get_rfd(const SSL *s);
15016    int SSL_get_wfd(const SSL *s);
15017    const char *SSL_get_cipher_list(const SSL *s, int n);
15018    char *SSL_get_shared_ciphers(const SSL *s, char *buf, int size);
15019    int SSL_get_read_ahead(const SSL *s);
15020    int SSL_pending(const SSL *s);
15021    int SSL_has_pending(const SSL *s);
15022   
15023    int SSL_set_fd(SSL *s, int fd);
15024    int SSL_set_rfd(SSL *s, int fd);
15025    int SSL_set_wfd(SSL *s, int fd);
15026   
15027   void SSL_set0_rbio(SSL *s, BIO *rbio);
15028   void SSL_set0_wbio(SSL *s, BIO *wbio);
15029   void SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio);
15030    BIO *SSL_get_rbio(const SSL *s);
15031    BIO *SSL_get_wbio(const SSL *s);
15032    int SSL_set_cipher_list(SSL *s, const char *str);
15033    int SSL_CTX_set_ciphersuites(SSL_CTX *ctx, const char *str);
15034    int SSL_set_ciphersuites(SSL *s, const char *str);
15035   void SSL_set_read_ahead(SSL *s, int yes);
15036    int SSL_get_verify_mode(const SSL *s);
15037    int SSL_get_verify_depth(const SSL *s);
15038    SSL_verify_cb SSL_get_verify_callback(const SSL *s);
15039   void SSL_set_verify(SSL *s, int mode, SSL_verify_cb callback);
15040   void SSL_set_verify_depth(SSL *s, int depth);
15041   void SSL_set_cert_cb(SSL *s, int (*cb) (SSL *ssl, void *arg), void *arg);
15042   
15043   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa);
15044   __attribute__((deprecated("Since OpenSSL " "3.0")))
15045    int SSL_use_RSAPrivateKey_ASN1(SSL *ssl,
15046                                         const unsigned char *d, long len);
15047   
15048    int SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey);
15049    int SSL_use_PrivateKey_ASN1(int pk, SSL *ssl, const unsigned char *d,
15050                                      long len);
15051    int SSL_use_certificate(SSL *ssl, X509 *x);
15052    int SSL_use_certificate_ASN1(SSL *ssl, const unsigned char *d, int len);
15053    int SSL_use_cert_and_key(SSL *ssl, X509 *x509, EVP_PKEY *privatekey,
15054                                   struct stack_st_X509 *chain, int override);
15055   
15056   
15057   
15058   
15059   
15060   
15061   
15062    int SSL_CTX_use_serverinfo(SSL_CTX *ctx, const unsigned char *serverinfo,
15063                                     size_t serverinfo_length);
15064    int SSL_CTX_use_serverinfo_ex(SSL_CTX *ctx, unsigned int version,
15065                                        const unsigned char *serverinfo,
15066                                        size_t serverinfo_length);
15067    int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file);
15068   
15069   
15070   __attribute__((deprecated("Since OpenSSL " "3.0")))
15071    int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type);
15072   
15073   
15074    int SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type);
15075    int SSL_use_certificate_file(SSL *ssl, const char *file, int type);
15076   
15077   
15078   __attribute__((deprecated("Since OpenSSL " "3.0")))
15079    int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file,
15080                                             int type);
15081   
15082    int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file,
15083                                          int type);
15084    int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file,
15085                                           int type);
15086   
15087    int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file);
15088    int SSL_use_certificate_chain_file(SSL *ssl, const char *file);
15089    struct stack_st_X509_NAME *SSL_load_client_CA_file(const char *file);
15090    struct stack_st_X509_NAME
15091   *SSL_load_client_CA_file_ex(const char *file, OSSL_LIB_CTX *libctx,
15092                               const char *propq);
15093    int SSL_add_file_cert_subjects_to_stack(struct stack_st_X509_NAME *stackCAs,
15094                                                  const char *file);
15095   int SSL_add_dir_cert_subjects_to_stack(struct stack_st_X509_NAME *stackCAs,
15096                                          const char *dir);
15097   int SSL_add_store_cert_subjects_to_stack(struct stack_st_X509_NAME *stackCAs,
15098                                          const char *uri);
15099   
15100   
15101   
15102   
15103   
15104   
15105   
15106    const char *SSL_state_string(const SSL *s);
15107    const char *SSL_rstate_string(const SSL *s);
15108    const char *SSL_state_string_long(const SSL *s);
15109    const char *SSL_rstate_string_long(const SSL *s);
15110    long SSL_SESSION_get_time(const SSL_SESSION *s);
15111    long SSL_SESSION_set_time(SSL_SESSION *s, long t);
15112    long SSL_SESSION_get_timeout(const SSL_SESSION *s);
15113    long SSL_SESSION_set_timeout(SSL_SESSION *s, long t);
15114    int SSL_SESSION_get_protocol_version(const SSL_SESSION *s);
15115    int SSL_SESSION_set_protocol_version(SSL_SESSION *s, int version);
15116   
15117    time_t SSL_SESSION_get_time_ex(const SSL_SESSION *s);
15118    time_t SSL_SESSION_set_time_ex(SSL_SESSION *s, time_t t);
15119   
15120    const char *SSL_SESSION_get0_hostname(const SSL_SESSION *s);
15121    int SSL_SESSION_set1_hostname(SSL_SESSION *s, const char *hostname);
15122   void SSL_SESSION_get0_alpn_selected(const SSL_SESSION *s,
15123                                       const unsigned char **alpn,
15124                                       size_t *len);
15125    int SSL_SESSION_set1_alpn_selected(SSL_SESSION *s,
15126                                             const unsigned char *alpn,
15127                                             size_t len);
15128    const SSL_CIPHER *SSL_SESSION_get0_cipher(const SSL_SESSION *s);
15129    int SSL_SESSION_set_cipher(SSL_SESSION *s, const SSL_CIPHER *cipher);
15130    int SSL_SESSION_has_ticket(const SSL_SESSION *s);
15131    unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s);
15132   void SSL_SESSION_get0_ticket(const SSL_SESSION *s, const unsigned char **tick,
15133                                size_t *len);
15134    uint32_t SSL_SESSION_get_max_early_data(const SSL_SESSION *s);
15135    int SSL_SESSION_set_max_early_data(SSL_SESSION *s,
15136                                             uint32_t max_early_data);
15137    int SSL_copy_session_id(SSL *to, const SSL *from);
15138    X509 *SSL_SESSION_get0_peer(SSL_SESSION *s);
15139    int SSL_SESSION_set1_id_context(SSL_SESSION *s,
15140                                          const unsigned char *sid_ctx,
15141                                          unsigned int sid_ctx_len);
15142    int SSL_SESSION_set1_id(SSL_SESSION *s, const unsigned char *sid,
15143                                  unsigned int sid_len);
15144    int SSL_SESSION_is_resumable(const SSL_SESSION *s);
15145   
15146    SSL_SESSION *SSL_SESSION_new(void);
15147    SSL_SESSION *SSL_SESSION_dup(const SSL_SESSION *src);
15148   const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s,
15149                                           unsigned int *len);
15150   const unsigned char *SSL_SESSION_get0_id_context(const SSL_SESSION *s,
15151                                                    unsigned int *len);
15152    unsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *s);
15153   
15154   int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *ses);
15155   
15156   int SSL_SESSION_print(BIO *fp, const SSL_SESSION *ses);
15157   int SSL_SESSION_print_keylog(BIO *bp, const SSL_SESSION *x);
15158   int SSL_SESSION_up_ref(SSL_SESSION *ses);
15159   void SSL_SESSION_free(SSL_SESSION *ses);
15160    int i2d_SSL_SESSION(const SSL_SESSION *in, unsigned char **pp);
15161    int SSL_set_session(SSL *to, SSL_SESSION *session);
15162   int SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *session);
15163   int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *session);
15164    int SSL_CTX_set_generate_session_id(SSL_CTX *ctx, GEN_SESSION_CB cb);
15165    int SSL_set_generate_session_id(SSL *s, GEN_SESSION_CB cb);
15166    int SSL_has_matching_session_id(const SSL *s,
15167                                          const unsigned char *id,
15168                                          unsigned int id_len);
15169   SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
15170                                long length);
15171   SSL_SESSION *d2i_SSL_SESSION_ex(SSL_SESSION **a, const unsigned char **pp,
15172                                   long length, OSSL_LIB_CTX *libctx,
15173                                   const char *propq);
15174   
15175   
15176    X509 *SSL_get0_peer_certificate(const SSL *s);
15177    X509 *SSL_get1_peer_certificate(const SSL *s);
15178   
15179   
15180   
15181   
15182   
15183   
15184    struct stack_st_X509 *SSL_get_peer_cert_chain(const SSL *s);
15185   
15186    int SSL_CTX_get_verify_mode(const SSL_CTX *ctx);
15187    int SSL_CTX_get_verify_depth(const SSL_CTX *ctx);
15188    SSL_verify_cb SSL_CTX_get_verify_callback(const SSL_CTX *ctx);
15189   void SSL_CTX_set_verify(SSL_CTX *ctx, int mode, SSL_verify_cb callback);
15190   void SSL_CTX_set_verify_depth(SSL_CTX *ctx, int depth);
15191   void SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx,
15192                                         int (*cb) (X509_STORE_CTX *, void *),
15193                                         void *arg);
15194   void SSL_CTX_set_cert_cb(SSL_CTX *c, int (*cb) (SSL *ssl, void *arg),
15195                            void *arg);
15196   
15197   __attribute__((deprecated("Since OpenSSL " "3.0")))
15198    int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa);
15199   __attribute__((deprecated("Since OpenSSL " "3.0")))
15200    int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, const unsigned char *d,
15201                                             long len);
15202   
15203    int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey);
15204    int SSL_CTX_use_PrivateKey_ASN1(int pk, SSL_CTX *ctx,
15205                                          const unsigned char *d, long len);
15206    int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x);
15207    int SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len,
15208                                           const unsigned char *d);
15209    int SSL_CTX_use_cert_and_key(SSL_CTX *ctx, X509 *x509, EVP_PKEY *privatekey,
15210                                       struct stack_st_X509 *chain, int override);
15211   
15212   void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb);
15213   void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u);
15214   pem_password_cb *SSL_CTX_get_default_passwd_cb(SSL_CTX *ctx);
15215   void *SSL_CTX_get_default_passwd_cb_userdata(SSL_CTX *ctx);
15216   void SSL_set_default_passwd_cb(SSL *s, pem_password_cb *cb);
15217   void SSL_set_default_passwd_cb_userdata(SSL *s, void *u);
15218   pem_password_cb *SSL_get_default_passwd_cb(SSL *s);
15219   void *SSL_get_default_passwd_cb_userdata(SSL *s);
15220   
15221    int SSL_CTX_check_private_key(const SSL_CTX *ctx);
15222    int SSL_check_private_key(const SSL *ctx);
15223   
15224    int SSL_CTX_set_session_id_context(SSL_CTX *ctx,
15225                                             const unsigned char *sid_ctx,
15226                                             unsigned int sid_ctx_len);
15227   
15228   SSL *SSL_new(SSL_CTX *ctx);
15229   int SSL_up_ref(SSL *s);
15230   int SSL_is_dtls(const SSL *s);
15231   int SSL_is_tls(const SSL *s);
15232   int SSL_is_quic(const SSL *s);
15233    int SSL_set_session_id_context(SSL *ssl, const unsigned char *sid_ctx,
15234                                         unsigned int sid_ctx_len);
15235   
15236    int SSL_CTX_set_purpose(SSL_CTX *ctx, int purpose);
15237    int SSL_set_purpose(SSL *ssl, int purpose);
15238    int SSL_CTX_set_trust(SSL_CTX *ctx, int trust);
15239    int SSL_set_trust(SSL *ssl, int trust);
15240   
15241    int SSL_set1_host(SSL *s, const char *hostname);
15242    int SSL_add1_host(SSL *s, const char *hostname);
15243    const char *SSL_get0_peername(SSL *s);
15244   void SSL_set_hostflags(SSL *s, unsigned int flags);
15245   
15246    int SSL_CTX_dane_enable(SSL_CTX *ctx);
15247    int SSL_CTX_dane_mtype_set(SSL_CTX *ctx, const EVP_MD *md,
15248                                     uint8_t mtype, uint8_t ord);
15249    int SSL_dane_enable(SSL *s, const char *basedomain);
15250    int SSL_dane_tlsa_add(SSL *s, uint8_t usage, uint8_t selector,
15251                                uint8_t mtype, const unsigned char *data, size_t dlen);
15252    int SSL_get0_dane_authority(SSL *s, X509 **mcert, EVP_PKEY **mspki);
15253    int SSL_get0_dane_tlsa(SSL *s, uint8_t *usage, uint8_t *selector,
15254                                 uint8_t *mtype, const unsigned char **data,
15255                                 size_t *dlen);
15256   
15257   
15258   
15259   
15260   SSL_DANE *SSL_get0_dane(SSL *ssl);
15261   
15262   
15263   
15264   unsigned long SSL_CTX_dane_set_flags(SSL_CTX *ctx, unsigned long flags);
15265   unsigned long SSL_CTX_dane_clear_flags(SSL_CTX *ctx, unsigned long flags);
15266   unsigned long SSL_dane_set_flags(SSL *ssl, unsigned long flags);
15267   unsigned long SSL_dane_clear_flags(SSL *ssl, unsigned long flags);
15268   
15269    int SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm);
15270    int SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm);
15271   
15272    X509_VERIFY_PARAM *SSL_CTX_get0_param(SSL_CTX *ctx);
15273    X509_VERIFY_PARAM *SSL_get0_param(SSL *ssl);
15274   
15275   
15276   
15277   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SSL_CTX_set_srp_username(SSL_CTX *ctx, char *name);
15278   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SSL_CTX_set_srp_password(SSL_CTX *ctx, char *password);
15279   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SSL_CTX_set_srp_strength(SSL_CTX *ctx, int strength);
15280   __attribute__((deprecated("Since OpenSSL " "3.0")))
15281   int SSL_CTX_set_srp_client_pwd_callback(SSL_CTX *ctx,
15282                                           char *(*cb) (SSL *, void *));
15283   __attribute__((deprecated("Since OpenSSL " "3.0")))
15284   int SSL_CTX_set_srp_verify_param_callback(SSL_CTX *ctx,
15285                                             int (*cb) (SSL *, void *));
15286   __attribute__((deprecated("Since OpenSSL " "3.0")))
15287   int SSL_CTX_set_srp_username_callback(SSL_CTX *ctx,
15288                                         int (*cb) (SSL *, int *, void *));
15289   __attribute__((deprecated("Since OpenSSL " "3.0"))) int SSL_CTX_set_srp_cb_arg(SSL_CTX *ctx, void *arg);
15290   
15291   __attribute__((deprecated("Since OpenSSL " "3.0")))
15292   int SSL_set_srp_server_param(SSL *s, const BIGNUM *N, const BIGNUM *g,
15293                                BIGNUM *sa, BIGNUM *v, char *info);
15294   __attribute__((deprecated("Since OpenSSL " "3.0")))
15295   int SSL_set_srp_server_param_pw(SSL *s, const char *user, const char *pass,
15296                                   const char *grp);
15297   
15298   __attribute__((deprecated("Since OpenSSL " "3.0"))) BIGNUM *SSL_get_srp_g(SSL *s);
15299   __attribute__((deprecated("Since OpenSSL " "3.0"))) BIGNUM *SSL_get_srp_N(SSL *s);
15300   
15301   __attribute__((deprecated("Since OpenSSL " "3.0"))) char *SSL_get_srp_username(SSL *s);
15302   __attribute__((deprecated("Since OpenSSL " "3.0"))) char *SSL_get_srp_userinfo(SSL *s);
15303   # 1963 "include/openssl/ssl.h"
15304   typedef int (*SSL_client_hello_cb_fn) (SSL *s, int *al, void *arg);
15305   void SSL_CTX_set_client_hello_cb(SSL_CTX *c, SSL_client_hello_cb_fn cb,
15306                                    void *arg);
15307   int SSL_client_hello_isv2(SSL *s);
15308   unsigned int SSL_client_hello_get0_legacy_version(SSL *s);
15309   size_t SSL_client_hello_get0_random(SSL *s, const unsigned char **out);
15310   size_t SSL_client_hello_get0_session_id(SSL *s, const unsigned char **out);
15311   size_t SSL_client_hello_get0_ciphers(SSL *s, const unsigned char **out);
15312   size_t SSL_client_hello_get0_compression_methods(SSL *s,
15313                                                    const unsigned char **out);
15314   int SSL_client_hello_get1_extensions_present(SSL *s, int **out, size_t *outlen);
15315   int SSL_client_hello_get_extension_order(SSL *s, uint16_t *exts,
15316                                            size_t *num_exts);
15317   int SSL_client_hello_get0_ext(SSL *s, unsigned int type,
15318                                 const unsigned char **out, size_t *outlen);
15319   
15320   void SSL_certs_clear(SSL *s);
15321   void SSL_free(SSL *ssl);
15322   
15323   
15324   
15325   
15326    int SSL_waiting_for_async(SSL *s);
15327    int SSL_get_all_async_fds(SSL *s, int *fds, size_t *numfds);
15328    int SSL_get_changed_async_fds(SSL *s, int *addfd,
15329                                        size_t *numaddfds, int *delfd,
15330                                        size_t *numdelfds);
15331    int SSL_CTX_set_async_callback(SSL_CTX *ctx, SSL_async_callback_fn callback);
15332    int SSL_CTX_set_async_callback_arg(SSL_CTX *ctx, void *arg);
15333    int SSL_set_async_callback(SSL *s, SSL_async_callback_fn callback);
15334    int SSL_set_async_callback_arg(SSL *s, void *arg);
15335    int SSL_get_async_status(SSL *s, int *status);
15336   
15337   
15338    int SSL_accept(SSL *ssl);
15339    int SSL_stateless(SSL *s);
15340    int SSL_connect(SSL *ssl);
15341    int SSL_read(SSL *ssl, void *buf, int num);
15342    int SSL_read_ex(SSL *ssl, void *buf, size_t num, size_t *readbytes);
15343   
15344   
15345   
15346   
15347   
15348    int SSL_read_early_data(SSL *s, void *buf, size_t num,
15349                                  size_t *readbytes);
15350    int SSL_peek(SSL *ssl, void *buf, int num);
15351    int SSL_peek_ex(SSL *ssl, void *buf, size_t num, size_t *readbytes);
15352    ssize_t SSL_sendfile(SSL *s, int fd, off_t offset, size_t size,
15353                                    int flags);
15354    int SSL_write(SSL *ssl, const void *buf, int num);
15355    int SSL_write_ex(SSL *s, const void *buf, size_t num, size_t *written);
15356    int SSL_write_early_data(SSL *s, const void *buf, size_t num,
15357                                   size_t *written);
15358   long SSL_ctrl(SSL *ssl, int cmd, long larg, void *parg);
15359   long SSL_callback_ctrl(SSL *, int, void (*)(void));
15360   long SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg);
15361   long SSL_CTX_callback_ctrl(SSL_CTX *, int, void (*)(void));
15362   
15363   
15364   
15365    int SSL_write_ex2(SSL *s, const void *buf, size_t num,
15366                            uint64_t flags,
15367                            size_t *written);
15368   
15369   
15370   
15371   
15372   
15373    int SSL_get_early_data_status(const SSL *s);
15374   
15375    int SSL_get_error(const SSL *s, int ret_code);
15376    const char *SSL_get_version(const SSL *s);
15377    int SSL_get_handshake_rtt(const SSL *s, uint64_t *rtt);
15378   
15379   
15380   
15381   __attribute__((deprecated("Since OpenSSL " "3.0")))
15382    int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth);
15383   # 2057 "include/openssl/ssl.h"
15384    const SSL_METHOD *TLS_method(void);
15385    const SSL_METHOD *TLS_server_method(void);
15386    const SSL_METHOD *TLS_client_method(void);
15387   
15388   
15389   
15390   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *TLSv1_method(void);
15391   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *TLSv1_server_method(void);
15392   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *TLSv1_client_method(void);
15393   
15394   
15395   
15396   
15397   
15398   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *TLSv1_1_method(void);
15399   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *TLSv1_1_server_method(void);
15400   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *TLSv1_1_client_method(void);
15401   
15402   
15403   
15404   
15405   
15406   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *TLSv1_2_method(void);
15407   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *TLSv1_2_server_method(void);
15408   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *TLSv1_2_client_method(void);
15409   
15410   
15411   
15412   
15413   
15414   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *DTLSv1_method(void);
15415   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *DTLSv1_server_method(void);
15416   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *DTLSv1_client_method(void);
15417   
15418   
15419   
15420   
15421   
15422   
15423   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *DTLSv1_2_method(void);
15424   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *DTLSv1_2_server_method(void);
15425   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) const SSL_METHOD *DTLSv1_2_client_method(void);
15426   
15427   
15428   
15429    const SSL_METHOD *DTLS_method(void);
15430    const SSL_METHOD *DTLS_server_method(void);
15431    const SSL_METHOD *DTLS_client_method(void);
15432   
15433    size_t DTLS_get_data_mtu(const SSL *s);
15434   
15435    struct stack_st_SSL_CIPHER *SSL_get_ciphers(const SSL *s);
15436    struct stack_st_SSL_CIPHER *SSL_CTX_get_ciphers(const SSL_CTX *ctx);
15437    struct stack_st_SSL_CIPHER *SSL_get_client_ciphers(const SSL *s);
15438    struct stack_st_SSL_CIPHER *SSL_get1_supported_ciphers(SSL *s);
15439   
15440    int SSL_do_handshake(SSL *s);
15441   int SSL_key_update(SSL *s, int updatetype);
15442   int SSL_get_key_update_type(const SSL *s);
15443   int SSL_renegotiate(SSL *s);
15444   int SSL_renegotiate_abbreviated(SSL *s);
15445    int SSL_renegotiate_pending(const SSL *s);
15446   int SSL_new_session_ticket(SSL *s);
15447   int SSL_shutdown(SSL *s);
15448    int SSL_verify_client_post_handshake(SSL *s);
15449   void SSL_CTX_set_post_handshake_auth(SSL_CTX *ctx, int val);
15450   void SSL_set_post_handshake_auth(SSL *s, int val);
15451   
15452    const SSL_METHOD *SSL_CTX_get_ssl_method(const SSL_CTX *ctx);
15453    const SSL_METHOD *SSL_get_ssl_method(const SSL *s);
15454    int SSL_set_ssl_method(SSL *s, const SSL_METHOD *method);
15455    const char *SSL_alert_type_string_long(int value);
15456    const char *SSL_alert_type_string(int value);
15457    const char *SSL_alert_desc_string_long(int value);
15458    const char *SSL_alert_desc_string(int value);
15459   
15460   void SSL_set0_CA_list(SSL *s, struct stack_st_X509_NAME *name_list);
15461   void SSL_CTX_set0_CA_list(SSL_CTX *ctx, struct stack_st_X509_NAME *name_list);
15462    const struct stack_st_X509_NAME *SSL_get0_CA_list(const SSL *s);
15463    const struct stack_st_X509_NAME *SSL_CTX_get0_CA_list(const SSL_CTX *ctx);
15464    int SSL_add1_to_CA_list(SSL *ssl, const X509 *x);
15465    int SSL_CTX_add1_to_CA_list(SSL_CTX *ctx, const X509 *x);
15466    const struct stack_st_X509_NAME *SSL_get0_peer_CA_list(const SSL *s);
15467   
15468   void SSL_set_client_CA_list(SSL *s, struct stack_st_X509_NAME *name_list);
15469   void SSL_CTX_set_client_CA_list(SSL_CTX *ctx, struct stack_st_X509_NAME *name_list);
15470    struct stack_st_X509_NAME *SSL_get_client_CA_list(const SSL *s);
15471    struct stack_st_X509_NAME *SSL_CTX_get_client_CA_list(const SSL_CTX *s);
15472    int SSL_add_client_CA(SSL *ssl, X509 *x);
15473    int SSL_CTX_add_client_CA(SSL_CTX *ctx, X509 *x);
15474   
15475   void SSL_set_connect_state(SSL *s);
15476   void SSL_set_accept_state(SSL *s);
15477   
15478    long SSL_get_default_timeout(const SSL *s);
15479   
15480   
15481   
15482   
15483   
15484    char *SSL_CIPHER_description(const SSL_CIPHER *, char *buf, int size);
15485    struct stack_st_X509_NAME *SSL_dup_CA_list(const struct stack_st_X509_NAME *sk);
15486   
15487    SSL *SSL_dup(SSL *ssl);
15488   
15489    X509 *SSL_get_certificate(const SSL *ssl);
15490   
15491   
15492   
15493   struct evp_pkey_st *SSL_get_privatekey(const SSL *ssl);
15494   
15495    X509 *SSL_CTX_get0_certificate(const SSL_CTX *ctx);
15496    EVP_PKEY *SSL_CTX_get0_privatekey(const SSL_CTX *ctx);
15497   
15498   void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode);
15499    int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx);
15500   void SSL_set_quiet_shutdown(SSL *ssl, int mode);
15501    int SSL_get_quiet_shutdown(const SSL *ssl);
15502   void SSL_set_shutdown(SSL *ssl, int mode);
15503    int SSL_get_shutdown(const SSL *ssl);
15504    int SSL_version(const SSL *ssl);
15505    int SSL_client_version(const SSL *s);
15506    int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx);
15507    int SSL_CTX_set_default_verify_dir(SSL_CTX *ctx);
15508    int SSL_CTX_set_default_verify_file(SSL_CTX *ctx);
15509    int SSL_CTX_set_default_verify_store(SSL_CTX *ctx);
15510    int SSL_CTX_load_verify_file(SSL_CTX *ctx, const char *CAfile);
15511    int SSL_CTX_load_verify_dir(SSL_CTX *ctx, const char *CApath);
15512    int SSL_CTX_load_verify_store(SSL_CTX *ctx, const char *CAstore);
15513    int SSL_CTX_load_verify_locations(SSL_CTX *ctx,
15514                                                           const char *CAfile,
15515                                                           const char *CApath);
15516   
15517    SSL_SESSION *SSL_get_session(const SSL *ssl);
15518    SSL_SESSION *SSL_get1_session(SSL *ssl);
15519    SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl);
15520   SSL_CTX *SSL_set_SSL_CTX(SSL *ssl, SSL_CTX *ctx);
15521   void SSL_set_info_callback(SSL *ssl,
15522                              void (*cb) (const SSL *ssl, int type, int val));
15523   void (*SSL_get_info_callback(const SSL *ssl)) (const SSL *ssl, int type,
15524                                                  int val);
15525    OSSL_HANDSHAKE_STATE SSL_get_state(const SSL *ssl);
15526   
15527   void SSL_set_verify_result(SSL *ssl, long v);
15528    long SSL_get_verify_result(const SSL *ssl);
15529    struct stack_st_X509 *SSL_get0_verified_chain(const SSL *s);
15530   
15531    size_t SSL_get_client_random(const SSL *ssl, unsigned char *out,
15532                                       size_t outlen);
15533    size_t SSL_get_server_random(const SSL *ssl, unsigned char *out,
15534                                       size_t outlen);
15535    size_t SSL_SESSION_get_master_key(const SSL_SESSION *sess,
15536                                            unsigned char *out, size_t outlen);
15537    int SSL_SESSION_set1_master_key(SSL_SESSION *sess,
15538                                          const unsigned char *in, size_t len);
15539   uint8_t SSL_SESSION_get_max_fragment_length(const SSL_SESSION *sess);
15540   
15541   
15542   
15543    int SSL_set_ex_data(SSL *ssl, int idx, void *data);
15544   void *SSL_get_ex_data(const SSL *ssl, int idx);
15545   
15546   
15547    int SSL_SESSION_set_ex_data(SSL_SESSION *ss, int idx, void *data);
15548   void *SSL_SESSION_get_ex_data(const SSL_SESSION *ss, int idx);
15549   
15550   
15551    int SSL_CTX_set_ex_data(SSL_CTX *ssl, int idx, void *data);
15552   void *SSL_CTX_get_ex_data(const SSL_CTX *ssl, int idx);
15553   
15554    int SSL_get_ex_data_X509_STORE_CTX_idx(void);
15555   # 2268 "include/openssl/ssl.h"
15556   void SSL_CTX_set_default_read_buffer_len(SSL_CTX *ctx, size_t len);
15557   void SSL_set_default_read_buffer_len(SSL *s, size_t len);
15558   
15559   
15560   
15561   
15562   __attribute__((deprecated("Since OpenSSL " "3.0")))
15563   void SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx,
15564                                    DH *(*dh) (SSL *ssl, int is_export,
15565                                               int keylength));
15566   __attribute__((deprecated("Since OpenSSL " "3.0")))
15567   void SSL_set_tmp_dh_callback(SSL *ssl,
15568                                DH *(*dh) (SSL *ssl, int is_export,
15569                                           int keylength));
15570   
15571   
15572   
15573    const COMP_METHOD *SSL_get_current_compression(const SSL *s);
15574    const COMP_METHOD *SSL_get_current_expansion(const SSL *s);
15575    const char *SSL_COMP_get_name(const COMP_METHOD *comp);
15576    const char *SSL_COMP_get0_name(const SSL_COMP *comp);
15577    int SSL_COMP_get_id(const SSL_COMP *comp);
15578   struct stack_st_SSL_COMP *SSL_COMP_get_compression_methods(void);
15579    struct stack_st_SSL_COMP *SSL_COMP_set0_compression_methods(struct stack_st_SSL_COMP
15580                                                                *meths);
15581   
15582   
15583   
15584    int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm);
15585   
15586   const SSL_CIPHER *SSL_CIPHER_find(SSL *ssl, const unsigned char *ptr);
15587   int SSL_CIPHER_get_cipher_nid(const SSL_CIPHER *c);
15588   int SSL_CIPHER_get_digest_nid(const SSL_CIPHER *c);
15589   int SSL_bytes_to_cipher_list(SSL *s, const unsigned char *bytes, size_t len,
15590                                int isv2format, struct stack_st_SSL_CIPHER **sk,
15591                                struct stack_st_SSL_CIPHER **scsvs);
15592   
15593   
15594    int SSL_set_session_ticket_ext(SSL *s, void *ext_data, int ext_len);
15595   
15596    int SSL_set_session_ticket_ext_cb(SSL *s,
15597                                            tls_session_ticket_ext_cb_fn cb,
15598                                            void *arg);
15599   
15600   
15601    int SSL_set_session_secret_cb(SSL *s,
15602                                        tls_session_secret_cb_fn session_secret_cb,
15603                                        void *arg);
15604   
15605   void SSL_CTX_set_not_resumable_session_callback(SSL_CTX *ctx,
15606                                                   int (*cb) (SSL *ssl,
15607                                                              int
15608                                                              is_forward_secure));
15609   
15610   void SSL_set_not_resumable_session_callback(SSL *ssl,
15611                                               int (*cb) (SSL *ssl,
15612                                                          int is_forward_secure));
15613   
15614   void SSL_CTX_set_record_padding_callback(SSL_CTX *ctx,
15615                                            size_t (*cb) (SSL *ssl, int type,
15616                                                          size_t len, void *arg));
15617   void SSL_CTX_set_record_padding_callback_arg(SSL_CTX *ctx, void *arg);
15618   void *SSL_CTX_get_record_padding_callback_arg(const SSL_CTX *ctx);
15619   int SSL_CTX_set_block_padding(SSL_CTX *ctx, size_t block_size);
15620   
15621   int SSL_set_record_padding_callback(SSL *ssl,
15622                                       size_t (*cb) (SSL *ssl, int type,
15623                                                     size_t len, void *arg));
15624   void SSL_set_record_padding_callback_arg(SSL *ssl, void *arg);
15625   void *SSL_get_record_padding_callback_arg(const SSL *ssl);
15626   int SSL_set_block_padding(SSL *ssl, size_t block_size);
15627   
15628   int SSL_set_num_tickets(SSL *s, size_t num_tickets);
15629   size_t SSL_get_num_tickets(const SSL *s);
15630   int SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets);
15631   size_t SSL_CTX_get_num_tickets(const SSL_CTX *ctx);
15632   
15633   
15634   int SSL_handle_events(SSL *s);
15635    int SSL_get_event_timeout(SSL *s, struct timeval *tv, int *is_infinite);
15636    int SSL_get_rpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *desc);
15637    int SSL_get_wpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *desc);
15638    int SSL_net_read_desired(SSL *s);
15639    int SSL_net_write_desired(SSL *s);
15640    int SSL_set_blocking_mode(SSL *s, int blocking);
15641    int SSL_get_blocking_mode(SSL *s);
15642    int SSL_set1_initial_peer_addr(SSL *s, const BIO_ADDR *peer_addr);
15643    SSL *SSL_get0_connection(SSL *s);
15644    int SSL_is_connection(SSL *s);
15645   
15646   
15647   
15648   
15649   
15650    int SSL_get_stream_type(SSL *s);
15651   
15652    uint64_t SSL_get_stream_id(SSL *s);
15653    int SSL_is_stream_local(SSL *s);
15654   
15655   
15656   
15657   
15658    int SSL_set_default_stream_mode(SSL *s, uint32_t mode);
15659   
15660   
15661   
15662   
15663    SSL *SSL_new_stream(SSL *s, uint64_t flags);
15664   
15665   
15666   
15667   
15668    int SSL_set_incoming_stream_policy(SSL *s, int policy, uint64_t aec);
15669   
15670   
15671    SSL *SSL_accept_stream(SSL *s, uint64_t flags);
15672    size_t SSL_get_accept_stream_queue_len(SSL *s);
15673   
15674   
15675    int SSL_inject_net_dgram(SSL *s, const unsigned char *buf,
15676                                   size_t buf_len,
15677                                   const BIO_ADDR *peer,
15678                                   const BIO_ADDR *local);
15679   
15680   
15681   typedef struct ssl_shutdown_ex_args_st {
15682       uint64_t quic_error_code;
15683       const char *quic_reason;
15684   } SSL_SHUTDOWN_EX_ARGS;
15685   
15686   
15687   
15688   
15689   
15690   
15691    int SSL_shutdown_ex(SSL *ssl, uint64_t flags,
15692                              const SSL_SHUTDOWN_EX_ARGS *args,
15693                              size_t args_len);
15694   
15695    int SSL_stream_conclude(SSL *ssl, uint64_t flags);
15696   
15697   typedef struct ssl_stream_reset_args_st {
15698       uint64_t quic_error_code;
15699   } SSL_STREAM_RESET_ARGS;
15700   
15701    int SSL_stream_reset(SSL *ssl,
15702                               const SSL_STREAM_RESET_ARGS *args,
15703                               size_t args_len);
15704   # 2424 "include/openssl/ssl.h"
15705    int SSL_get_stream_read_state(SSL *ssl);
15706    int SSL_get_stream_write_state(SSL *ssl);
15707   
15708    int SSL_get_stream_read_error_code(SSL *ssl, uint64_t *app_error_code);
15709    int SSL_get_stream_write_error_code(SSL *ssl, uint64_t *app_error_code);
15710   
15711   
15712   
15713   
15714   typedef struct ssl_conn_close_info_st {
15715       uint64_t error_code, frame_type;
15716       const char *reason;
15717       size_t reason_len;
15718       uint32_t flags;
15719   } SSL_CONN_CLOSE_INFO;
15720   
15721    int SSL_get_conn_close_info(SSL *ssl,
15722                                      SSL_CONN_CLOSE_INFO *info,
15723                                      size_t info_len);
15724   # 2464 "include/openssl/ssl.h"
15725   int SSL_get_value_uint(SSL *s, uint32_t class_, uint32_t id, uint64_t *v);
15726   int SSL_set_value_uint(SSL *s, uint32_t class_, uint32_t id, uint64_t v);
15727   # 2538 "include/openssl/ssl.h"
15728   typedef struct ssl_poll_item_st {
15729       BIO_POLL_DESCRIPTOR desc;
15730       uint64_t events, revents;
15731   } SSL_POLL_ITEM;
15732   
15733   
15734   
15735    int SSL_poll(SSL_POLL_ITEM *items,
15736                       size_t num_items,
15737                       size_t stride,
15738                       const struct timeval *timeout,
15739                       uint64_t flags,
15740                       size_t *result_count);
15741   
15742   static inline __attribute__((unused)) BIO_POLL_DESCRIPTOR
15743   SSL_as_poll_descriptor(SSL *s)
15744   {
15745       BIO_POLL_DESCRIPTOR d;
15746   
15747       d.type = 2;
15748       d.value.ssl = s;
15749       return d;
15750   }
15751   
15752   
15753   
15754   
15755   
15756    int SSL_session_reused(const SSL *s);
15757    int SSL_is_server(const SSL *s);
15758   
15759    SSL_CONF_CTX *SSL_CONF_CTX_new(void);
15760   int SSL_CONF_CTX_finish(SSL_CONF_CTX *cctx);
15761   void SSL_CONF_CTX_free(SSL_CONF_CTX *cctx);
15762   unsigned int SSL_CONF_CTX_set_flags(SSL_CONF_CTX *cctx, unsigned int flags);
15763    unsigned int SSL_CONF_CTX_clear_flags(SSL_CONF_CTX *cctx,
15764                                                unsigned int flags);
15765    int SSL_CONF_CTX_set1_prefix(SSL_CONF_CTX *cctx, const char *pre);
15766   
15767   void SSL_CONF_CTX_set_ssl(SSL_CONF_CTX *cctx, SSL *ssl);
15768   void SSL_CONF_CTX_set_ssl_ctx(SSL_CONF_CTX *cctx, SSL_CTX *ctx);
15769   
15770    int SSL_CONF_cmd(SSL_CONF_CTX *cctx, const char *cmd, const char *value);
15771    int SSL_CONF_cmd_argv(SSL_CONF_CTX *cctx, int *pargc, char ***pargv);
15772    int SSL_CONF_cmd_value_type(SSL_CONF_CTX *cctx, const char *cmd);
15773   
15774   void SSL_add_ssl_module(void);
15775   int SSL_config(SSL *s, const char *name);
15776   int SSL_CTX_config(SSL_CTX *ctx, const char *name);
15777   
15778   
15779   void SSL_trace(int write_p, int version, int content_type,
15780                  const void *buf, size_t len, SSL *ssl, void *arg);
15781   
15782   
15783   
15784   int DTLSv1_listen(SSL *s, BIO_ADDR *client);
15785   # 2605 "include/openssl/ssl.h"
15786   typedef int (*ssl_ct_validation_cb)(const CT_POLICY_EVAL_CTX *ctx,
15787                                       const struct stack_st_SCT *scts, void *arg);
15788   # 2620 "include/openssl/ssl.h"
15789   int SSL_set_ct_validation_callback(SSL *s, ssl_ct_validation_cb callback,
15790                                      void *arg);
15791   int SSL_CTX_set_ct_validation_callback(SSL_CTX *ctx,
15792                                          ssl_ct_validation_cb callback,
15793                                          void *arg);
15794   # 2635 "include/openssl/ssl.h"
15795   enum {
15796       SSL_CT_VALIDATION_PERMISSIVE = 0,
15797       SSL_CT_VALIDATION_STRICT
15798   };
15799   # 2648 "include/openssl/ssl.h"
15800   int SSL_enable_ct(SSL *s, int validation_mode);
15801   int SSL_CTX_enable_ct(SSL_CTX *ctx, int validation_mode);
15802   
15803   
15804   
15805   
15806   int SSL_ct_is_enabled(const SSL *s);
15807   int SSL_CTX_ct_is_enabled(const SSL_CTX *ctx);
15808   
15809   
15810   const struct stack_st_SCT *SSL_get0_peer_scts(SSL *s);
15811   # 2667 "include/openssl/ssl.h"
15812   int SSL_CTX_set_default_ctlog_list_file(SSL_CTX *ctx);
15813   # 2676 "include/openssl/ssl.h"
15814   int SSL_CTX_set_ctlog_list_file(SSL_CTX *ctx, const char *path);
15815   
15816   
15817   
15818   
15819   
15820   void SSL_CTX_set0_ctlog_store(SSL_CTX *ctx, CTLOG_STORE *logs);
15821   # 2691 "include/openssl/ssl.h"
15822   const CTLOG_STORE *SSL_CTX_get0_ctlog_store(const SSL_CTX *ctx);
15823   # 2753 "include/openssl/ssl.h"
15824   void SSL_set_security_level(SSL *s, int level);
15825    int SSL_get_security_level(const SSL *s);
15826   void SSL_set_security_callback(SSL *s,
15827                                  int (*cb) (const SSL *s, const SSL_CTX *ctx,
15828                                             int op, int bits, int nid,
15829                                             void *other, void *ex));
15830   int (*SSL_get_security_callback(const SSL *s)) (const SSL *s,
15831                                                   const SSL_CTX *ctx, int op,
15832                                                   int bits, int nid, void *other,
15833                                                   void *ex);
15834   void SSL_set0_security_ex_data(SSL *s, void *ex);
15835    void *SSL_get0_security_ex_data(const SSL *s);
15836   
15837   void SSL_CTX_set_security_level(SSL_CTX *ctx, int level);
15838    int SSL_CTX_get_security_level(const SSL_CTX *ctx);
15839   void SSL_CTX_set_security_callback(SSL_CTX *ctx,
15840                                      int (*cb) (const SSL *s, const SSL_CTX *ctx,
15841                                                 int op, int bits, int nid,
15842                                                 void *other, void *ex));
15843   int (*SSL_CTX_get_security_callback(const SSL_CTX *ctx)) (const SSL *s,
15844                                                             const SSL_CTX *ctx,
15845                                                             int op, int bits,
15846                                                             int nid,
15847                                                             void *other,
15848                                                             void *ex);
15849   void SSL_CTX_set0_security_ex_data(SSL_CTX *ctx, void *ex);
15850    void *SSL_CTX_get0_security_ex_data(const SSL_CTX *ctx);
15851   # 2788 "include/openssl/ssl.h"
15852   int OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
15853   
15854   
15855   
15856   
15857   
15858    int SSL_free_buffers(SSL *ssl);
15859    int SSL_alloc_buffers(SSL *ssl);
15860   
15861   
15862   
15863   typedef int SSL_TICKET_STATUS;
15864   # 2818 "include/openssl/ssl.h"
15865   typedef int SSL_TICKET_RETURN;
15866   # 2831 "include/openssl/ssl.h"
15867   typedef int (*SSL_CTX_generate_session_ticket_fn)(SSL *s, void *arg);
15868   typedef SSL_TICKET_RETURN (*SSL_CTX_decrypt_session_ticket_fn)(SSL *s, SSL_SESSION *ss,
15869                                                                  const unsigned char *keyname,
15870                                                                  size_t keyname_length,
15871                                                                  SSL_TICKET_STATUS status,
15872                                                                  void *arg);
15873   int SSL_CTX_set_session_ticket_cb(SSL_CTX *ctx,
15874                                     SSL_CTX_generate_session_ticket_fn gen_cb,
15875                                     SSL_CTX_decrypt_session_ticket_fn dec_cb,
15876                                     void *arg);
15877   int SSL_SESSION_set1_ticket_appdata(SSL_SESSION *ss, const void *data, size_t len);
15878   int SSL_SESSION_get0_ticket_appdata(SSL_SESSION *ss, void **data, size_t *len);
15879   
15880   typedef unsigned int (*DTLS_timer_cb)(SSL *s, unsigned int timer_us);
15881   
15882   void DTLS_set_timer_cb(SSL *s, DTLS_timer_cb cb);
15883   
15884   
15885   typedef int (*SSL_allow_early_data_cb_fn)(SSL *s, void *arg);
15886   void SSL_CTX_set_allow_early_data_cb(SSL_CTX *ctx,
15887                                        SSL_allow_early_data_cb_fn cb,
15888                                        void *arg);
15889   void SSL_set_allow_early_data_cb(SSL *s,
15890                                    SSL_allow_early_data_cb_fn cb,
15891                                    void *arg);
15892   
15893   
15894   const char *OSSL_default_cipher_list(void);
15895   const char *OSSL_default_ciphersuites(void);
15896   
15897   
15898   
15899   int SSL_CTX_compress_certs(SSL_CTX *ctx, int alg);
15900   int SSL_compress_certs(SSL *ssl, int alg);
15901   
15902   int SSL_CTX_set1_cert_comp_preference(SSL_CTX *ctx, int *algs, size_t len);
15903   int SSL_set1_cert_comp_preference(SSL *ssl, int *algs, size_t len);
15904   
15905   int SSL_CTX_set1_compressed_cert(SSL_CTX *ctx, int algorithm, unsigned char *comp_data,
15906                                   size_t comp_length, size_t orig_length);
15907   int SSL_set1_compressed_cert(SSL *ssl, int algorithm, unsigned char *comp_data,
15908                               size_t comp_length, size_t orig_length);
15909   size_t SSL_CTX_get1_compressed_cert(SSL_CTX *ctx, int alg, unsigned char **data, size_t *orig_len);
15910   size_t SSL_get1_compressed_cert(SSL *ssl, int alg, unsigned char **data, size_t *orig_len);
15911   
15912    int SSL_add_expected_rpk(SSL *s, EVP_PKEY *rpk);
15913    EVP_PKEY *SSL_get0_peer_rpk(const SSL *s);
15914    EVP_PKEY *SSL_SESSION_get0_peer_rpk(SSL_SESSION *s);
15915    int SSL_get_negotiated_client_cert_type(const SSL *s);
15916    int SSL_get_negotiated_server_cert_type(const SSL *s);
15917   
15918    int SSL_set1_client_cert_type(SSL *s, const unsigned char *val, size_t len);
15919    int SSL_set1_server_cert_type(SSL *s, const unsigned char *val, size_t len);
15920    int SSL_CTX_set1_client_cert_type(SSL_CTX *ctx, const unsigned char *val, size_t len);
15921    int SSL_CTX_set1_server_cert_type(SSL_CTX *ctx, const unsigned char *val, size_t len);
15922    int SSL_get0_client_cert_type(const SSL *s, unsigned char **t, size_t *len);
15923    int SSL_get0_server_cert_type(const SSL *s, unsigned char **t, size_t *len);
15924    int SSL_CTX_get0_client_cert_type(const SSL_CTX *ctx, unsigned char **t, size_t *len);
15925    int SSL_CTX_get0_server_cert_type(const SSL_CTX *s, unsigned char **t, size_t *len);
15926   # 27 "ssl/ssl_local.h" 2
15927   
15928   
15929   
15930   # 1 "include/internal/recordmethod.h" 1
15931   # 12 "include/internal/recordmethod.h"
15932           
15933   # 31 "include/internal/recordmethod.h"
15934   typedef struct ossl_record_method_st OSSL_RECORD_METHOD;
15935   
15936   
15937   
15938   
15939   
15940   typedef struct ossl_record_layer_st OSSL_RECORD_LAYER;
15941   # 65 "include/internal/recordmethod.h"
15942   struct ossl_record_template_st {
15943       unsigned char type;
15944       unsigned int version;
15945       const unsigned char *buf;
15946       size_t buflen;
15947   };
15948   
15949   typedef struct ossl_record_template_st OSSL_RECORD_TEMPLATE;
15950   # 88 "include/internal/recordmethod.h"
15951   struct ossl_record_method_st {
15952   # 122 "include/internal/recordmethod.h"
15953       int (*new_record_layer)(OSSL_LIB_CTX *libctx,
15954                               const char *propq, int vers,
15955                               int role, int direction,
15956                               int level,
15957                               uint16_t epoch,
15958                               unsigned char *secret,
15959                               size_t secretlen,
15960                               unsigned char *key,
15961                               size_t keylen,
15962                               unsigned char *iv,
15963                               size_t ivlen,
15964                               unsigned char *mackey,
15965                               size_t mackeylen,
15966                               const EVP_CIPHER *ciph,
15967                               size_t taglen,
15968                               int mactype,
15969                               const EVP_MD *md,
15970                               COMP_METHOD *comp,
15971                               const EVP_MD *kdfdigest,
15972                               BIO *prev,
15973                               BIO *transport,
15974                               BIO *next,
15975                               BIO_ADDR *local,
15976                               BIO_ADDR *peer,
15977                               const OSSL_PARAM *settings,
15978                               const OSSL_PARAM *options,
15979                               const OSSL_DISPATCH *fns,
15980                               void *cbarg,
15981                               void *rlarg,
15982                               OSSL_RECORD_LAYER **ret);
15983       int (*free)(OSSL_RECORD_LAYER *rl);
15984   
15985   
15986       int (*unprocessed_read_pending)(OSSL_RECORD_LAYER *rl);
15987   
15988   
15989   
15990   
15991   
15992       int (*processed_read_pending)(OSSL_RECORD_LAYER *rl);
15993   
15994   
15995   
15996   
15997   
15998       size_t (*app_data_pending)(OSSL_RECORD_LAYER *rl);
15999   # 182 "include/internal/recordmethod.h"
16000       size_t (*get_max_records)(OSSL_RECORD_LAYER *rl, uint8_t type, size_t len,
16001                                 size_t maxfrag, size_t *preffrag);
16002   # 205 "include/internal/recordmethod.h"
16003       int (*write_records)(OSSL_RECORD_LAYER *rl, OSSL_RECORD_TEMPLATE *templates,
16004                            size_t numtempl);
16005   # 217 "include/internal/recordmethod.h"
16006       int (*retry_write_records)(OSSL_RECORD_LAYER *rl);
16007   # 234 "include/internal/recordmethod.h"
16008       int (*read_record)(OSSL_RECORD_LAYER *rl, void **rechandle, int *rversion,
16009                         uint8_t *type, const unsigned char **data, size_t *datalen,
16010                         uint16_t *epoch, unsigned char *seq_num);
16011   
16012   
16013   
16014   
16015   
16016   
16017       int (*release_record)(OSSL_RECORD_LAYER *rl, void *rechandle, size_t length);
16018   
16019   
16020   
16021   
16022   
16023   
16024       int (*get_alert_code)(OSSL_RECORD_LAYER *rl);
16025   
16026   
16027   
16028   
16029   
16030       int (*set1_bio)(OSSL_RECORD_LAYER *rl, BIO *bio);
16031   
16032   
16033       int (*set_protocol_version)(OSSL_RECORD_LAYER *rl, int version);
16034   
16035   
16036   
16037   
16038   
16039   
16040       void (*set_plain_alerts)(OSSL_RECORD_LAYER *rl, int allow);
16041   
16042   
16043   
16044   
16045   
16046       void (*set_first_handshake)(OSSL_RECORD_LAYER *rl, int first);
16047   
16048   
16049   
16050   
16051   
16052       void (*set_max_pipelines)(OSSL_RECORD_LAYER *rl, size_t max_pipelines);
16053   
16054   
16055   
16056   
16057   
16058       void (*set_in_init)(OSSL_RECORD_LAYER *rl, int in_init);
16059   
16060   
16061   
16062   
16063       void (*get_state)(OSSL_RECORD_LAYER *rl, const char **shortstr,
16064                         const char **longstr);
16065   
16066   
16067   
16068   
16069   
16070       int (*set_options)(OSSL_RECORD_LAYER *rl, const OSSL_PARAM *options);
16071   
16072       const COMP_METHOD *(*get_compression)(OSSL_RECORD_LAYER *rl);
16073   
16074   
16075   
16076   
16077   
16078   
16079       void (*set_max_frag_len)(OSSL_RECORD_LAYER *rl, size_t max_frag_len);
16080   
16081   
16082   
16083   
16084   
16085       size_t (*get_max_record_overhead)(OSSL_RECORD_LAYER *rl);
16086   
16087   
16088   
16089   
16090       int (*increment_sequence_ctr)(OSSL_RECORD_LAYER *rl);
16091   
16092   
16093   
16094   
16095   
16096       int (*alloc_buffers)(OSSL_RECORD_LAYER *rl);
16097   
16098   
16099   
16100   
16101   
16102       int (*free_buffers)(OSSL_RECORD_LAYER *rl);
16103   };
16104   
16105   
16106   
16107   extern const OSSL_RECORD_METHOD ossl_tls_record_method;
16108   
16109   
16110   
16111   extern const OSSL_RECORD_METHOD ossl_dtls_record_method;
16112   # 31 "ssl/ssl_local.h" 2
16113   # 1 "include/internal/statem.h" 1
16114   # 22 "include/internal/statem.h"
16115   typedef enum {
16116   
16117       WORK_ERROR,
16118   
16119       WORK_FINISHED_STOP,
16120   
16121       WORK_FINISHED_CONTINUE,
16122   
16123       WORK_MORE_A,
16124   
16125       WORK_MORE_B,
16126   
16127       WORK_MORE_C
16128   } WORK_STATE;
16129   
16130   
16131   typedef enum {
16132   
16133       WRITE_TRAN_ERROR,
16134   
16135       WRITE_TRAN_CONTINUE,
16136   
16137       WRITE_TRAN_FINISHED
16138   } WRITE_TRAN;
16139   
16140   
16141   typedef enum {
16142   
16143       MSG_FLOW_UNINITED,
16144   
16145       MSG_FLOW_ERROR,
16146   
16147       MSG_FLOW_READING,
16148   
16149       MSG_FLOW_WRITING,
16150   
16151       MSG_FLOW_FINISHED
16152   } MSG_FLOW_STATE;
16153   
16154   
16155   typedef enum {
16156       READ_STATE_HEADER,
16157       READ_STATE_BODY,
16158       READ_STATE_POST_PROCESS
16159   } READ_STATE;
16160   
16161   
16162   typedef enum {
16163       WRITE_STATE_TRANSITION,
16164       WRITE_STATE_PRE_WORK,
16165       WRITE_STATE_SEND,
16166       WRITE_STATE_POST_WORK
16167   } WRITE_STATE;
16168   
16169   typedef enum {
16170       CON_FUNC_ERROR = 0,
16171       CON_FUNC_SUCCESS,
16172       CON_FUNC_DONT_SEND
16173   } CON_FUNC_RETURN;
16174   
16175   typedef int (*ossl_statem_mutate_handshake_cb)(const unsigned char *msgin,
16176                                                  size_t inlen,
16177                                                  unsigned char **msgout,
16178                                                  size_t *outlen,
16179                                                  void *arg);
16180   
16181   typedef void (*ossl_statem_finish_mutate_handshake_cb)(void *arg);
16182   # 98 "include/internal/statem.h"
16183   struct ossl_statem_st {
16184       MSG_FLOW_STATE state;
16185       WRITE_STATE write_state;
16186       WORK_STATE write_state_work;
16187       READ_STATE read_state;
16188       WORK_STATE read_state_work;
16189       OSSL_HANDSHAKE_STATE hand_state;
16190   
16191       OSSL_HANDSHAKE_STATE request_state;
16192       int in_init;
16193       int read_state_first_init;
16194   
16195       int in_handshake;
16196   
16197   
16198   
16199   
16200       int cleanuphand;
16201   
16202       unsigned int no_cert_verify;
16203       int use_timer;
16204   
16205   
16206       ossl_statem_mutate_handshake_cb mutate_handshake_cb;
16207       ossl_statem_finish_mutate_handshake_cb finish_mutate_handshake_cb;
16208       void *mutatearg;
16209       unsigned int write_in_progress : 1;
16210   };
16211   typedef struct ossl_statem_st OSSL_STATEM;
16212   # 135 "include/internal/statem.h"
16213   typedef struct ssl_connection_st SSL_CONNECTION;
16214   
16215    int ossl_statem_accept(SSL *s);
16216    int ossl_statem_connect(SSL *s);
16217   OSSL_HANDSHAKE_STATE ossl_statem_get_state(SSL_CONNECTION *s);
16218   void ossl_statem_clear(SSL_CONNECTION *s);
16219   void ossl_statem_set_renegotiate(SSL_CONNECTION *s);
16220   void ossl_statem_send_fatal(SSL_CONNECTION *s, int al);
16221   void ossl_statem_fatal(SSL_CONNECTION *s, int al, int reason,
16222                          const char *fmt, ...);
16223   
16224   
16225   
16226   
16227   
16228   
16229   
16230   int ossl_statem_in_error(const SSL_CONNECTION *s);
16231   void ossl_statem_set_in_init(SSL_CONNECTION *s, int init);
16232   int ossl_statem_get_in_handshake(SSL_CONNECTION *s);
16233   void ossl_statem_set_in_handshake(SSL_CONNECTION *s, int inhand);
16234    int ossl_statem_skip_early_data(SSL_CONNECTION *s);
16235   void ossl_statem_check_finish_init(SSL_CONNECTION *s, int send);
16236   void ossl_statem_set_hello_verify_done(SSL_CONNECTION *s);
16237    int ossl_statem_app_data_allowed(SSL_CONNECTION *s);
16238    int ossl_statem_export_allowed(SSL_CONNECTION *s);
16239    int ossl_statem_export_early_allowed(SSL_CONNECTION *s);
16240   
16241   
16242   int statem_flush(SSL_CONNECTION *s);
16243   
16244   int ossl_statem_set_mutator(SSL *s,
16245                               ossl_statem_mutate_handshake_cb mutate_handshake_cb,
16246                               ossl_statem_finish_mutate_handshake_cb finish_mutate_handshake_cb,
16247                               void *mutatearg);
16248   # 32 "ssl/ssl_local.h" 2
16249   # 1 "include/internal/packet.h" 1
16250   # 12 "include/internal/packet.h"
16251           
16252   # 22 "include/internal/packet.h"
16253   typedef struct {
16254   
16255       const unsigned char *curr;
16256   
16257       size_t remaining;
16258   } PACKET;
16259   
16260   
16261   static inline void packet_forward(PACKET *pkt, size_t len)
16262   {
16263       pkt->curr += len;
16264       pkt->remaining -= len;
16265   }
16266   
16267   
16268   
16269   
16270   static inline size_t PACKET_remaining(const PACKET *pkt)
16271   {
16272       return pkt->remaining;
16273   }
16274   
16275   
16276   
16277   
16278   
16279   
16280   
16281   static inline const unsigned char *PACKET_end(const PACKET *pkt)
16282   {
16283       return pkt->curr + pkt->remaining;
16284   }
16285   
16286   
16287   
16288   
16289   
16290   static inline const unsigned char *PACKET_data(const PACKET *pkt)
16291   {
16292       return pkt->curr;
16293   }
16294   
16295   
16296   
16297   
16298   
16299   
16300    static inline int PACKET_buf_init(PACKET *pkt,
16301                                                 const unsigned char *buf,
16302                                                 size_t len)
16303   {
16304   
16305       if (len > (size_t)(
16306   # 74 "include/internal/packet.h" 3 4
16307                         (18446744073709551615UL) 
16308   # 74 "include/internal/packet.h"
16309                                  / 2))
16310           return 0;
16311   
16312       pkt->curr = buf;
16313       pkt->remaining = len;
16314       return 1;
16315   }
16316   
16317   
16318   static inline void PACKET_null_init(PACKET *pkt)
16319   {
16320       pkt->curr = 
16321   # 85 "include/internal/packet.h" 3 4
16322                  ((void *)0)
16323   # 85 "include/internal/packet.h"
16324                      ;
16325       pkt->remaining = 0;
16326   }
16327   
16328   
16329   
16330   
16331   
16332   
16333    static inline int PACKET_equal(const PACKET *pkt, const void *ptr,
16334                                              size_t num)
16335   {
16336       if (PACKET_remaining(pkt) != num)
16337           return 0;
16338       return CRYPTO_memcmp(pkt->curr, ptr, num) == 0;
16339   }
16340   
16341   
16342   
16343   
16344   
16345   
16346    static inline int PACKET_peek_sub_packet(const PACKET *pkt,
16347                                                        PACKET *subpkt, size_t len)
16348   {
16349       if (PACKET_remaining(pkt) < len)
16350           return 0;
16351   
16352       return PACKET_buf_init(subpkt, pkt->curr, len);
16353   }
16354   
16355   
16356   
16357   
16358   
16359   
16360    static inline int PACKET_get_sub_packet(PACKET *pkt,
16361                                                       PACKET *subpkt, size_t len)
16362   {
16363       if (!PACKET_peek_sub_packet(pkt, subpkt, len))
16364           return 0;
16365   
16366       packet_forward(pkt, len);
16367   
16368       return 1;
16369   }
16370   
16371   
16372   
16373   
16374   
16375    static inline int PACKET_peek_net_2(const PACKET *pkt,
16376                                                   unsigned int *data)
16377   {
16378       if (PACKET_remaining(pkt) < 2)
16379           return 0;
16380   
16381       *data = ((unsigned int)(*pkt->curr)) << 8;
16382       *data |= *(pkt->curr + 1);
16383   
16384       return 1;
16385   }
16386   
16387   
16388   
16389    static inline int PACKET_get_net_2(PACKET *pkt, unsigned int *data)
16390   {
16391       if (!PACKET_peek_net_2(pkt, data))
16392           return 0;
16393   
16394       packet_forward(pkt, 2);
16395   
16396       return 1;
16397   }
16398   
16399   
16400    static inline int PACKET_get_net_2_len(PACKET *pkt, size_t *data)
16401   {
16402       unsigned int i;
16403       int ret = PACKET_get_net_2(pkt, &i);
16404   
16405       if (ret)
16406           *data = (size_t)i;
16407   
16408       return ret;
16409   }
16410   
16411   
16412   
16413   
16414   
16415    static inline int PACKET_peek_net_3(const PACKET *pkt,
16416                                                   unsigned long *data)
16417   {
16418       if (PACKET_remaining(pkt) < 3)
16419           return 0;
16420   
16421       *data = ((unsigned long)(*pkt->curr)) << 16;
16422       *data |= ((unsigned long)(*(pkt->curr + 1))) << 8;
16423       *data |= *(pkt->curr + 2);
16424   
16425       return 1;
16426   }
16427   
16428   
16429   
16430    static inline int PACKET_get_net_3(PACKET *pkt, unsigned long *data)
16431   {
16432       if (!PACKET_peek_net_3(pkt, data))
16433           return 0;
16434   
16435       packet_forward(pkt, 3);
16436   
16437       return 1;
16438   }
16439   
16440   
16441    static inline int PACKET_get_net_3_len(PACKET *pkt, size_t *data)
16442   {
16443       unsigned long i;
16444       int ret = PACKET_get_net_3(pkt, &i);
16445   
16446       if (ret)
16447           *data = (size_t)i;
16448   
16449       return ret;
16450   }
16451   
16452   
16453   
16454   
16455   
16456    static inline int PACKET_peek_net_4(const PACKET *pkt,
16457                                                   unsigned long *data)
16458   {
16459       if (PACKET_remaining(pkt) < 4)
16460           return 0;
16461   
16462       *data = ((unsigned long)(*pkt->curr)) << 24;
16463       *data |= ((unsigned long)(*(pkt->curr + 1))) << 16;
16464       *data |= ((unsigned long)(*(pkt->curr + 2))) << 8;
16465       *data |= *(pkt->curr + 3);
16466   
16467       return 1;
16468   }
16469   
16470   
16471   
16472   
16473   
16474    static inline int PACKET_peek_net_8(const PACKET *pkt,
16475                                                   uint64_t *data)
16476   {
16477       if (PACKET_remaining(pkt) < 8)
16478           return 0;
16479   
16480       *data = ((uint64_t)(*pkt->curr)) << 56;
16481       *data |= ((uint64_t)(*(pkt->curr + 1))) << 48;
16482       *data |= ((uint64_t)(*(pkt->curr + 2))) << 40;
16483       *data |= ((uint64_t)(*(pkt->curr + 3))) << 32;
16484       *data |= ((uint64_t)(*(pkt->curr + 4))) << 24;
16485       *data |= ((uint64_t)(*(pkt->curr + 5))) << 16;
16486       *data |= ((uint64_t)(*(pkt->curr + 6))) << 8;
16487       *data |= *(pkt->curr + 7);
16488   
16489       return 1;
16490   }
16491   
16492   
16493   
16494    static inline int PACKET_get_net_4(PACKET *pkt, unsigned long *data)
16495   {
16496       if (!PACKET_peek_net_4(pkt, data))
16497           return 0;
16498   
16499       packet_forward(pkt, 4);
16500   
16501       return 1;
16502   }
16503   
16504   
16505    static inline int PACKET_get_net_4_len(PACKET *pkt, size_t *data)
16506   {
16507       unsigned long i;
16508       int ret = PACKET_get_net_4(pkt, &i);
16509   
16510       if (ret)
16511           *data = (size_t)i;
16512   
16513       return ret;
16514   }
16515   
16516   
16517    static inline int PACKET_get_net_8(PACKET *pkt, uint64_t *data)
16518   {
16519       if (!PACKET_peek_net_8(pkt, data))
16520           return 0;
16521   
16522       packet_forward(pkt, 8);
16523   
16524       return 1;
16525   }
16526   
16527   
16528    static inline int PACKET_peek_1(const PACKET *pkt,
16529                                               unsigned int *data)
16530   {
16531       if (!PACKET_remaining(pkt))
16532           return 0;
16533   
16534       *data = *pkt->curr;
16535   
16536       return 1;
16537   }
16538   
16539   
16540    static inline int PACKET_get_1(PACKET *pkt, unsigned int *data)
16541   {
16542       if (!PACKET_peek_1(pkt, data))
16543           return 0;
16544   
16545       packet_forward(pkt, 1);
16546   
16547       return 1;
16548   }
16549   
16550   
16551    static inline int PACKET_get_1_len(PACKET *pkt, size_t *data)
16552   {
16553       unsigned int i;
16554       int ret = PACKET_get_1(pkt, &i);
16555   
16556       if (ret)
16557           *data = (size_t)i;
16558   
16559       return ret;
16560   }
16561   
16562   
16563   
16564   
16565   
16566    static inline int PACKET_peek_4(const PACKET *pkt,
16567                                               unsigned long *data)
16568   {
16569       if (PACKET_remaining(pkt) < 4)
16570           return 0;
16571   
16572       *data = *pkt->curr;
16573       *data |= ((unsigned long)(*(pkt->curr + 1))) << 8;
16574       *data |= ((unsigned long)(*(pkt->curr + 2))) << 16;
16575       *data |= ((unsigned long)(*(pkt->curr + 3))) << 24;
16576   
16577       return 1;
16578   }
16579   
16580   
16581   
16582   
16583   
16584   
16585    static inline int PACKET_get_4(PACKET *pkt, unsigned long *data)
16586   {
16587       if (!PACKET_peek_4(pkt, data))
16588           return 0;
16589   
16590       packet_forward(pkt, 4);
16591   
16592       return 1;
16593   }
16594   
16595   
16596   
16597   
16598   
16599   
16600   
16601    static inline int PACKET_peek_bytes(const PACKET *pkt,
16602                                                   const unsigned char **data,
16603                                                   size_t len)
16604   {
16605       if (PACKET_remaining(pkt) < len)
16606           return 0;
16607   
16608       *data = pkt->curr;
16609   
16610       return 1;
16611   }
16612   
16613   
16614   
16615   
16616   
16617   
16618   
16619    static inline int PACKET_get_bytes(PACKET *pkt,
16620                                                  const unsigned char **data,
16621                                                  size_t len)
16622   {
16623       if (!PACKET_peek_bytes(pkt, data, len))
16624           return 0;
16625   
16626       packet_forward(pkt, len);
16627   
16628       return 1;
16629   }
16630   
16631   
16632    static inline int PACKET_peek_copy_bytes(const PACKET *pkt,
16633                                                        unsigned char *data,
16634                                                        size_t len)
16635   {
16636       if (PACKET_remaining(pkt) < len)
16637           return 0;
16638   
16639       memcpy(data, pkt->curr, len);
16640   
16641       return 1;
16642   }
16643   
16644   
16645   
16646   
16647   
16648    static inline int PACKET_copy_bytes(PACKET *pkt,
16649                                                   unsigned char *data, size_t len)
16650   {
16651       if (!PACKET_peek_copy_bytes(pkt, data, len))
16652           return 0;
16653   
16654       packet_forward(pkt, len);
16655   
16656       return 1;
16657   }
16658   # 427 "include/internal/packet.h"
16659    static inline int PACKET_copy_all(const PACKET *pkt,
16660                                                 unsigned char *dest,
16661                                                 size_t dest_len, size_t *len)
16662   {
16663       if (PACKET_remaining(pkt) > dest_len) {
16664           *len = 0;
16665           return 0;
16666       }
16667       *len = pkt->remaining;
16668       memcpy(dest, pkt->curr, pkt->remaining);
16669       return 1;
16670   }
16671   # 449 "include/internal/packet.h"
16672    static inline int PACKET_memdup(const PACKET *pkt,
16673                                               unsigned char **data, size_t *len)
16674   {
16675       size_t length;
16676   
16677       CRYPTO_free(*data, "include/internal/packet.h", 454);
16678       *data = 
16679   # 455 "include/internal/packet.h" 3 4
16680              ((void *)0)
16681   # 455 "include/internal/packet.h"
16682                  ;
16683       *len = 0;
16684   
16685       length = PACKET_remaining(pkt);
16686   
16687       if (length == 0)
16688           return 1;
16689   
16690       *data = CRYPTO_memdup((pkt->curr), length, "include/internal/packet.h", 463);
16691       if (*data == 
16692   # 464 "include/internal/packet.h" 3 4
16693                   ((void *)0)
16694   # 464 "include/internal/packet.h"
16695                       )
16696           return 0;
16697   
16698       *len = length;
16699       return 1;
16700   }
16701   # 481 "include/internal/packet.h"
16702    static inline int PACKET_strndup(const PACKET *pkt, char **data)
16703   {
16704       CRYPTO_free(*data, "include/internal/packet.h", 483);
16705   
16706   
16707       *data = CRYPTO_strndup((const char *)pkt->curr, PACKET_remaining(pkt), "include/internal/packet.h", 486);
16708       return (*data != 
16709   # 487 "include/internal/packet.h" 3 4
16710                       ((void *)0)
16711   # 487 "include/internal/packet.h"
16712                           );
16713   }
16714   
16715   
16716   static inline int PACKET_contains_zero_byte(const PACKET *pkt)
16717   {
16718       return memchr(pkt->curr, 0, pkt->remaining) != 
16719   # 493 "include/internal/packet.h" 3 4
16720                                                     ((void *)0)
16721   # 493 "include/internal/packet.h"
16722                                                         ;
16723   }
16724   
16725   
16726    static inline int PACKET_forward(PACKET *pkt, size_t len)
16727   {
16728       if (PACKET_remaining(pkt) < len)
16729           return 0;
16730   
16731       packet_forward(pkt, len);
16732   
16733       return 1;
16734   }
16735   # 514 "include/internal/packet.h"
16736    static inline int PACKET_get_length_prefixed_1(PACKET *pkt,
16737                                                              PACKET *subpkt)
16738   {
16739       unsigned int length;
16740       const unsigned char *data;
16741       PACKET tmp = *pkt;
16742       if (!PACKET_get_1(&tmp, &length) ||
16743           !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
16744           return 0;
16745       }
16746   
16747       *pkt = tmp;
16748       subpkt->curr = data;
16749       subpkt->remaining = length;
16750   
16751       return 1;
16752   }
16753   
16754   
16755   
16756   
16757   
16758    static inline int PACKET_as_length_prefixed_1(PACKET *pkt,
16759                                                             PACKET *subpkt)
16760   {
16761       unsigned int length;
16762       const unsigned char *data;
16763       PACKET tmp = *pkt;
16764       if (!PACKET_get_1(&tmp, &length) ||
16765           !PACKET_get_bytes(&tmp, &data, (size_t)length) ||
16766           PACKET_remaining(&tmp) != 0) {
16767           return 0;
16768       }
16769   
16770       *pkt = tmp;
16771       subpkt->curr = data;
16772       subpkt->remaining = length;
16773   
16774       return 1;
16775   }
16776   # 562 "include/internal/packet.h"
16777    static inline int PACKET_get_length_prefixed_2(PACKET *pkt,
16778                                                              PACKET *subpkt)
16779   {
16780       unsigned int length;
16781       const unsigned char *data;
16782       PACKET tmp = *pkt;
16783   
16784       if (!PACKET_get_net_2(&tmp, &length) ||
16785           !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
16786           return 0;
16787       }
16788   
16789       *pkt = tmp;
16790       subpkt->curr = data;
16791       subpkt->remaining = length;
16792   
16793       return 1;
16794   }
16795   
16796   
16797   
16798   
16799   
16800    static inline int PACKET_as_length_prefixed_2(PACKET *pkt,
16801                                                             PACKET *subpkt)
16802   {
16803       unsigned int length;
16804       const unsigned char *data;
16805       PACKET tmp = *pkt;
16806   
16807       if (!PACKET_get_net_2(&tmp, &length) ||
16808           !PACKET_get_bytes(&tmp, &data, (size_t)length) ||
16809           PACKET_remaining(&tmp) != 0) {
16810           return 0;
16811       }
16812   
16813       *pkt = tmp;
16814       subpkt->curr = data;
16815       subpkt->remaining = length;
16816   
16817       return 1;
16818   }
16819   # 612 "include/internal/packet.h"
16820    static inline int PACKET_get_length_prefixed_3(PACKET *pkt,
16821                                                              PACKET *subpkt)
16822   {
16823       unsigned long length;
16824       const unsigned char *data;
16825       PACKET tmp = *pkt;
16826       if (!PACKET_get_net_3(&tmp, &length) ||
16827           !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
16828           return 0;
16829       }
16830   
16831       *pkt = tmp;
16832       subpkt->curr = data;
16833       subpkt->remaining = length;
16834   
16835       return 1;
16836   }
16837   
16838   
16839   
16840   typedef struct wpacket_sub WPACKET_SUB;
16841   struct wpacket_sub {
16842   
16843       WPACKET_SUB *parent;
16844   
16845   
16846   
16847   
16848   
16849       size_t packet_len;
16850   
16851   
16852       size_t lenbytes;
16853   
16854   
16855       size_t pwritten;
16856   
16857   
16858       unsigned int flags;
16859   };
16860   
16861   typedef struct wpacket_st WPACKET;
16862   struct wpacket_st {
16863   
16864       BUF_MEM *buf;
16865   
16866   
16867       unsigned char *staticbuf;
16868   
16869   
16870   
16871   
16872   
16873       size_t curr;
16874   
16875   
16876       size_t written;
16877   
16878   
16879       size_t maxsize;
16880   
16881   
16882       WPACKET_SUB *subs;
16883   
16884   
16885       unsigned int endfirst : 1;
16886   };
16887   # 703 "include/internal/packet.h"
16888   int WPACKET_init_len(WPACKET *pkt, BUF_MEM *buf, size_t lenbytes);
16889   
16890   
16891   
16892   
16893   
16894   int WPACKET_init(WPACKET *pkt, BUF_MEM *buf);
16895   
16896   
16897   
16898   
16899   
16900   
16901   int WPACKET_init_null(WPACKET *pkt, size_t lenbytes);
16902   
16903   
16904   
16905   
16906   
16907   int WPACKET_init_null_der(WPACKET *pkt);
16908   
16909   
16910   
16911   
16912   
16913   
16914   int WPACKET_init_static_len(WPACKET *pkt, unsigned char *buf, size_t len,
16915                               size_t lenbytes);
16916   
16917   
16918   
16919   
16920   
16921   
16922   int WPACKET_init_der(WPACKET *pkt, unsigned char *buf, size_t len);
16923   
16924   
16925   
16926   
16927   int WPACKET_set_flags(WPACKET *pkt, unsigned int flags);
16928   
16929   
16930   
16931   
16932   
16933   
16934   
16935   int WPACKET_close(WPACKET *pkt);
16936   
16937   
16938   
16939   
16940   
16941   int WPACKET_finish(WPACKET *pkt);
16942   # 765 "include/internal/packet.h"
16943   int WPACKET_fill_lengths(WPACKET *pkt);
16944   
16945   
16946   
16947   
16948   
16949   
16950   int WPACKET_start_sub_packet_len__(WPACKET *pkt, size_t lenbytes);
16951   # 791 "include/internal/packet.h"
16952   int WPACKET_start_sub_packet(WPACKET *pkt);
16953   # 801 "include/internal/packet.h"
16954   int WPACKET_allocate_bytes(WPACKET *pkt, size_t len,
16955                              unsigned char **allocbytes);
16956   
16957   
16958   
16959   
16960   
16961   
16962   
16963   int WPACKET_sub_allocate_bytes__(WPACKET *pkt, size_t len,
16964                                    unsigned char **allocbytes, size_t lenbytes);
16965   # 844 "include/internal/packet.h"
16966   int WPACKET_reserve_bytes(WPACKET *pkt, size_t len, unsigned char **allocbytes);
16967   
16968   
16969   
16970   
16971   int WPACKET_sub_reserve_bytes__(WPACKET *pkt, size_t len,
16972                                    unsigned char **allocbytes, size_t lenbytes);
16973   # 871 "include/internal/packet.h"
16974   int WPACKET_put_bytes__(WPACKET *pkt, uint64_t val, size_t bytes);
16975   # 889 "include/internal/packet.h"
16976   int WPACKET_set_max_size(WPACKET *pkt, size_t maxsize);
16977   
16978   
16979   int WPACKET_memcpy(WPACKET *pkt, const void *src, size_t len);
16980   
16981   
16982   int WPACKET_memset(WPACKET *pkt, int ch, size_t len);
16983   
16984   
16985   
16986   
16987   
16988   
16989   int WPACKET_sub_memcpy__(WPACKET *pkt, const void *src, size_t len,
16990                          size_t lenbytes);
16991   # 919 "include/internal/packet.h"
16992   int WPACKET_get_total_written(WPACKET *pkt, size_t *written);
16993   
16994   
16995   
16996   
16997   
16998   int WPACKET_get_length(WPACKET *pkt, size_t *len);
16999   
17000   
17001   
17002   
17003   
17004   unsigned char *WPACKET_get_curr(WPACKET *pkt);
17005   
17006   
17007   int WPACKET_is_null_buf(WPACKET *pkt);
17008   
17009   
17010   void WPACKET_cleanup(WPACKET *pkt);
17011   # 33 "ssl/ssl_local.h" 2
17012   # 1 "include/internal/dane.h" 1
17013   # 12 "include/internal/dane.h"
17014           
17015   # 43 "include/internal/dane.h"
17016   typedef struct danetls_record_st {
17017       uint8_t usage;
17018       uint8_t selector;
17019       uint8_t mtype;
17020       unsigned char *data;
17021       size_t dlen;
17022       EVP_PKEY *spki;
17023   } danetls_record;
17024   
17025   struct stack_st_danetls_record; typedef int (*sk_danetls_record_compfunc)(const danetls_record * const *a, const danetls_record *const *b); typedef void (*sk_danetls_record_freefunc)(danetls_record *a); typedef danetls_record * (*sk_danetls_record_copyfunc)(const danetls_record *a); static __attribute__((unused)) inline int sk_danetls_record_num(const struct stack_st_danetls_record *sk) { return OPENSSL_sk_num((const OPENSSL_STACK *)sk); } static __attribute__((unused)) inline danetls_record *sk_danetls_record_value(const struct stack_st_danetls_record *sk, int idx) { return (danetls_record *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx); } static __attribute__((unused)) inline struct stack_st_danetls_record *sk_danetls_record_new(sk_danetls_record_compfunc compare) { return (struct stack_st_danetls_record *)OPENSSL_sk_new((OPENSSL_sk_compfunc)compare); } static __attribute__((unused)) inline struct stack_st_danetls_record *sk_danetls_record_new_null(void) { return (struct stack_st_danetls_record *)OPENSSL_sk_new_null(); } static __attribute__((unused)) inline struct stack_st_danetls_record *sk_danetls_record_new_reserve(sk_danetls_record_compfunc compare, int n) { return (struct stack_st_danetls_record *)OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n); } static __attribute__((unused)) inline int sk_danetls_record_reserve(struct stack_st_danetls_record *sk, int n) { return OPENSSL_sk_reserve((OPENSSL_STACK *)sk, n); } static __attribute__((unused)) inline void sk_danetls_record_free(struct stack_st_danetls_record *sk) { OPENSSL_sk_free((OPENSSL_STACK *)sk); } static __attribute__((unused)) inline void sk_danetls_record_zero(struct stack_st_danetls_record *sk) { OPENSSL_sk_zero((OPENSSL_STACK *)sk); } static __attribute__((unused)) inline danetls_record *sk_danetls_record_delete(struct stack_st_danetls_record *sk, int i) { return (danetls_record *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i); } static __attribute__((unused)) inline danetls_record *sk_danetls_record_delete_ptr(struct stack_st_danetls_record *sk, danetls_record *ptr) { return (danetls_record *)OPENSSL_sk_delete_ptr((OPENSSL_STACK *)sk, (const void *)ptr); } static __attribute__((unused)) inline int sk_danetls_record_push(struct stack_st_danetls_record *sk, danetls_record *ptr) { return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr); } static __attribute__((unused)) inline int sk_danetls_record_unshift(struct stack_st_danetls_record *sk, danetls_record *ptr) { return OPENSSL_sk_unshift((OPENSSL_STACK *)sk, (const void *)ptr); } static __attribute__((unused)) inline danetls_record *sk_danetls_record_pop(struct stack_st_danetls_record *sk) { return (danetls_record *)OPENSSL_sk_pop((OPENSSL_STACK *)sk); } static __attribute__((unused)) inline danetls_record *sk_danetls_record_shift(struct stack_st_danetls_record *sk) { return (danetls_record *)OPENSSL_sk_shift((OPENSSL_STACK *)sk); } static __attribute__((unused)) inline void sk_danetls_record_pop_free(struct stack_st_danetls_record *sk, sk_danetls_record_freefunc freefunc) { OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); } static __attribute__((unused)) inline int sk_danetls_record_insert(struct stack_st_danetls_record *sk, danetls_record *ptr, int idx) { return OPENSSL_sk_insert((OPENSSL_STACK *)sk, (const void *)ptr, idx); } static __attribute__((unused)) inline danetls_record *sk_danetls_record_set(struct stack_st_danetls_record *sk, int idx, danetls_record *ptr) { return (danetls_record *)OPENSSL_sk_set((OPENSSL_STACK *)sk, idx, (const void *)ptr); } static __attribute__((unused)) inline int sk_danetls_record_find(struct stack_st_danetls_record *sk, danetls_record *ptr) { return OPENSSL_sk_find((OPENSSL_STACK *)sk, (const void *)ptr); } static __attribute__((unused)) inline int sk_danetls_record_find_ex(struct stack_st_danetls_record *sk, danetls_record *ptr) { return OPENSSL_sk_find_ex((OPENSSL_STACK *)sk, (const void *)ptr); } static __attribute__((unused)) inline int sk_danetls_record_find_all(struct stack_st_danetls_record *sk, danetls_record *ptr, int *pnum) { return OPENSSL_sk_find_all((OPENSSL_STACK *)sk, (const void *)ptr, pnum); } static __attribute__((unused)) inline void sk_danetls_record_sort(struct stack_st_danetls_record *sk) { OPENSSL_sk_sort((OPENSSL_STACK *)sk); } static __attribute__((unused)) inline int sk_danetls_record_is_sorted(const struct stack_st_danetls_record *sk) { return OPENSSL_sk_is_sorted((const OPENSSL_STACK *)sk); } static __attribute__((unused)) inline struct stack_st_danetls_record * sk_danetls_record_dup(const struct stack_st_danetls_record *sk) { return (struct stack_st_danetls_record *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk); } static __attribute__((unused)) inline struct stack_st_danetls_record *sk_danetls_record_deep_copy(const struct stack_st_danetls_record *sk, sk_danetls_record_copyfunc copyfunc, sk_danetls_record_freefunc freefunc) { return (struct stack_st_danetls_record *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk, (OPENSSL_sk_copyfunc)copyfunc, (OPENSSL_sk_freefunc)freefunc); } static __attribute__((unused)) inline sk_danetls_record_compfunc sk_danetls_record_set_cmp_func(struct stack_st_danetls_record *sk, sk_danetls_record_compfunc compare) { return (sk_danetls_record_compfunc)OPENSSL_sk_set_cmp_func((OPENSSL_STACK *)sk, (OPENSSL_sk_compfunc)compare); }
17026   
17027   
17028   
17029   
17030   struct dane_ctx_st {
17031       const EVP_MD **mdevp;
17032       uint8_t *mdord;
17033       uint8_t mdmax;
17034       unsigned long flags;
17035   };
17036   
17037   
17038   
17039   
17040   struct ssl_dane_st {
17041       struct dane_ctx_st *dctx;
17042       struct stack_st_danetls_record *trecs;
17043       struct stack_st_X509 *certs;
17044       danetls_record *mtlsa;
17045       X509 *mcert;
17046       uint32_t umask;
17047       int mdpth;
17048       int pdpth;
17049       unsigned long flags;
17050   };
17051   # 34 "ssl/ssl_local.h" 2
17052   # 1 "include/internal/refcount.h" 1
17053   # 11 "include/internal/refcount.h"
17054           
17055   
17056   
17057   # 1 "include/openssl/trace.h" 1
17058   # 12 "include/openssl/trace.h"
17059           
17060   # 64 "include/openssl/trace.h"
17061   int OSSL_trace_get_category_num(const char *name);
17062   
17063   
17064   const char *OSSL_trace_get_category_name(int num);
17065   # 80 "include/openssl/trace.h"
17066   int OSSL_trace_set_channel(int category, BIO* channel);
17067   # 91 "include/openssl/trace.h"
17068   int OSSL_trace_set_prefix(int category, const char *prefix);
17069   int OSSL_trace_set_suffix(int category, const char *suffix);
17070   # 105 "include/openssl/trace.h"
17071   typedef size_t (*OSSL_trace_cb)(const char *buffer, size_t count,
17072                                   int category, int cmd, void *data);
17073   # 125 "include/openssl/trace.h"
17074   int OSSL_trace_set_callback(int category, OSSL_trace_cb callback, void *data);
17075   # 134 "include/openssl/trace.h"
17076   int OSSL_trace_enabled(int category);
17077   # 153 "include/openssl/trace.h"
17078   BIO *OSSL_trace_begin(int category);
17079   void OSSL_trace_end(int category, BIO *channel);
17080   # 309 "include/openssl/trace.h"
17081   int OSSL_trace_string(BIO *out, int text, int full,
17082                         const unsigned char *data, size_t size);
17083   # 15 "include/internal/refcount.h" 2
17084   
17085   
17086   
17087   
17088   
17089   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stdatomic.h" 1 3 4
17090   # 29 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stdatomic.h" 3 4
17091   
17092   # 29 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stdatomic.h" 3 4
17093   typedef enum
17094     {
17095       memory_order_relaxed = 0,
17096       memory_order_consume = 1,
17097       memory_order_acquire = 2,
17098       memory_order_release = 3,
17099       memory_order_acq_rel = 4,
17100       memory_order_seq_cst = 5
17101     } memory_order;
17102   
17103   
17104   typedef _Atomic _Bool atomic_bool;
17105   typedef _Atomic char atomic_char;
17106   typedef _Atomic signed char atomic_schar;
17107   typedef _Atomic unsigned char atomic_uchar;
17108   typedef _Atomic short atomic_short;
17109   typedef _Atomic unsigned short atomic_ushort;
17110   typedef _Atomic int atomic_int;
17111   typedef _Atomic unsigned int atomic_uint;
17112   typedef _Atomic long atomic_long;
17113   typedef _Atomic unsigned long atomic_ulong;
17114   typedef _Atomic long long atomic_llong;
17115   typedef _Atomic unsigned long long atomic_ullong;
17116   typedef _Atomic short unsigned int atomic_char16_t;
17117   typedef _Atomic unsigned int atomic_char32_t;
17118   typedef _Atomic int atomic_wchar_t;
17119   typedef _Atomic signed char atomic_int_least8_t;
17120   typedef _Atomic unsigned char atomic_uint_least8_t;
17121   typedef _Atomic short int atomic_int_least16_t;
17122   typedef _Atomic short unsigned int atomic_uint_least16_t;
17123   typedef _Atomic int atomic_int_least32_t;
17124   typedef _Atomic unsigned int atomic_uint_least32_t;
17125   typedef _Atomic long int atomic_int_least64_t;
17126   typedef _Atomic long unsigned int atomic_uint_least64_t;
17127   typedef _Atomic signed char atomic_int_fast8_t;
17128   typedef _Atomic unsigned char atomic_uint_fast8_t;
17129   typedef _Atomic long int atomic_int_fast16_t;
17130   typedef _Atomic long unsigned int atomic_uint_fast16_t;
17131   typedef _Atomic long int atomic_int_fast32_t;
17132   typedef _Atomic long unsigned int atomic_uint_fast32_t;
17133   typedef _Atomic long int atomic_int_fast64_t;
17134   typedef _Atomic long unsigned int atomic_uint_fast64_t;
17135   typedef _Atomic long int atomic_intptr_t;
17136   typedef _Atomic long unsigned int atomic_uintptr_t;
17137   typedef _Atomic long unsigned int atomic_size_t;
17138   typedef _Atomic long int atomic_ptrdiff_t;
17139   typedef _Atomic long int atomic_intmax_t;
17140   typedef _Atomic long unsigned int atomic_uintmax_t;
17141   # 92 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stdatomic.h" 3 4
17142   extern void atomic_thread_fence (memory_order);
17143   
17144   extern void atomic_signal_fence (memory_order);
17145   # 218 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stdatomic.h" 3 4
17146   typedef _Atomic struct
17147   {
17148   
17149     _Bool __val;
17150   
17151   
17152   
17153   } atomic_flag;
17154   
17155   
17156   
17157   
17158   extern _Bool atomic_flag_test_and_set (volatile atomic_flag *);
17159   
17160   
17161   extern _Bool atomic_flag_test_and_set_explicit (volatile atomic_flag *,
17162         memory_order);
17163   
17164   
17165   
17166   extern void atomic_flag_clear (volatile atomic_flag *);
17167   
17168   extern void atomic_flag_clear_explicit (volatile atomic_flag *, memory_order);
17169   # 21 "include/internal/refcount.h" 2
17170   # 29 "include/internal/refcount.h"
17171   
17172   # 29 "include/internal/refcount.h"
17173   typedef struct {
17174       _Atomic int val;
17175   } CRYPTO_REF_COUNT;
17176   
17177   static inline int CRYPTO_UP_REF(CRYPTO_REF_COUNT *refcnt, int *ret)
17178   {
17179       *ret = 
17180   # 35 "include/internal/refcount.h" 3 4
17181             __atomic_fetch_add ((
17182   # 35 "include/internal/refcount.h"
17183             &refcnt->val
17184   # 35 "include/internal/refcount.h" 3 4
17185             ), (
17186   # 35 "include/internal/refcount.h"
17187             1
17188   # 35 "include/internal/refcount.h" 3 4
17189             ), (
17190   # 35 "include/internal/refcount.h"
17191             memory_order_relaxed
17192   # 35 "include/internal/refcount.h" 3 4
17193             )) 
17194   # 35 "include/internal/refcount.h"
17195                                                                              + 1;
17196       return 1;
17197   }
17198   # 49 "include/internal/refcount.h"
17199   static inline int CRYPTO_DOWN_REF(CRYPTO_REF_COUNT *refcnt, int *ret)
17200   {
17201       *ret = 
17202   # 51 "include/internal/refcount.h" 3 4
17203             __atomic_fetch_sub ((
17204   # 51 "include/internal/refcount.h"
17205             &refcnt->val
17206   # 51 "include/internal/refcount.h" 3 4
17207             ), (
17208   # 51 "include/internal/refcount.h"
17209             1
17210   # 51 "include/internal/refcount.h" 3 4
17211             ), (
17212   # 51 "include/internal/refcount.h"
17213             memory_order_relaxed
17214   # 51 "include/internal/refcount.h" 3 4
17215             )) 
17216   # 51 "include/internal/refcount.h"
17217                                                                              - 1;
17218       if (*ret == 0)
17219           
17220   # 53 "include/internal/refcount.h" 3 4
17221          __atomic_thread_fence (
17222   # 53 "include/internal/refcount.h"
17223          memory_order_acquire
17224   # 53 "include/internal/refcount.h" 3 4
17225          )
17226   # 53 "include/internal/refcount.h"
17227                                                   ;
17228       return 1;
17229   }
17230   
17231   static inline int CRYPTO_GET_REF(CRYPTO_REF_COUNT *refcnt, int *ret)
17232   {
17233       *ret = 
17234   # 59 "include/internal/refcount.h" 3 4
17235             __extension__ ({ __auto_type __atomic_load_ptr = (
17236   # 59 "include/internal/refcount.h"
17237             &refcnt->val
17238   # 59 "include/internal/refcount.h" 3 4
17239             ); __typeof__ ((void)0, *__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, (
17240   # 59 "include/internal/refcount.h"
17241             memory_order_relaxed
17242   # 59 "include/internal/refcount.h" 3 4
17243             )); __atomic_load_tmp; })
17244   # 59 "include/internal/refcount.h"
17245                                                                     ;
17246       return 1;
17247   }
17248   # 267 "include/internal/refcount.h"
17249   static __attribute__((unused)) inline int CRYPTO_NEW_REF(CRYPTO_REF_COUNT *refcnt, int n)
17250   {
17251       refcnt->val = n;
17252       return 1;
17253   }
17254   
17255   static __attribute__((unused)) inline void CRYPTO_FREE_REF(CRYPTO_REF_COUNT *refcnt)
17256    {
17257   }
17258   # 35 "ssl/ssl_local.h" 2
17259   # 1 "include/internal/tsan_assist.h" 1
17260   # 52 "include/internal/tsan_assist.h"
17261           
17262   # 36 "ssl/ssl_local.h" 2
17263   # 1 "include/internal/bio.h" 1
17264   # 12 "include/internal/bio.h"
17265           
17266   
17267   
17268   
17269   
17270   struct bio_method_st {
17271       int type;
17272       char *name;
17273       int (*bwrite) (BIO *, const char *, size_t, size_t *);
17274       int (*bwrite_old) (BIO *, const char *, int);
17275       int (*bread) (BIO *, char *, size_t, size_t *);
17276       int (*bread_old) (BIO *, char *, int);
17277       int (*bputs) (BIO *, const char *);
17278       int (*bgets) (BIO *, char *, int);
17279       long (*ctrl) (BIO *, int, long, void *);
17280       int (*create) (BIO *);
17281       int (*destroy) (BIO *);
17282       long (*callback_ctrl) (BIO *, int, BIO_info_cb *);
17283       int (*bsendmmsg) (BIO *, BIO_MSG *, size_t, size_t, uint64_t, size_t *);
17284       int (*brecvmmsg) (BIO *, BIO_MSG *, size_t, size_t, uint64_t, size_t *);
17285   };
17286   
17287   void bio_free_ex_data(BIO *bio);
17288   void bio_cleanup(void);
17289   
17290   
17291   
17292   int bwrite_conv(BIO *bio, const char *data, size_t datal, size_t *written);
17293   int bread_conv(BIO *bio, char *data, size_t datal, size_t *read);
17294   # 85 "include/internal/bio.h"
17295   OSSL_CORE_BIO *ossl_core_bio_new_from_bio(BIO *bio);
17296   OSSL_CORE_BIO *ossl_core_bio_new_file(const char *filename, const char *mode);
17297   OSSL_CORE_BIO *ossl_core_bio_new_mem_buf(const void *buf, int len);
17298   int ossl_core_bio_read_ex(OSSL_CORE_BIO *cb, void *data, size_t dlen,
17299                             size_t *readbytes);
17300   int ossl_core_bio_write_ex(OSSL_CORE_BIO *cb, const void *data, size_t dlen,
17301                              size_t *written);
17302   int ossl_core_bio_gets(OSSL_CORE_BIO *cb, char *buf, int size);
17303   int ossl_core_bio_puts(OSSL_CORE_BIO *cb, const char *buf);
17304   long ossl_core_bio_ctrl(OSSL_CORE_BIO *cb, int cmd, long larg, void *parg);
17305   int ossl_core_bio_up_ref(OSSL_CORE_BIO *cb);
17306   int ossl_core_bio_free(OSSL_CORE_BIO *cb);
17307   int ossl_core_bio_vprintf(OSSL_CORE_BIO *cb, const char *format, va_list args);
17308   
17309   int ossl_bio_init_core(OSSL_LIB_CTX *libctx, const OSSL_DISPATCH *fns);
17310   # 37 "ssl/ssl_local.h" 2
17311   # 1 "include/internal/ktls.h" 1
17312   # 25 "include/internal/ktls.h"
17313           
17314   # 38 "ssl/ssl_local.h" 2
17315   # 1 "include/internal/time.h" 1
17316   # 12 "include/internal/time.h"
17317           
17318   
17319   
17320   
17321   # 1 "include/internal/safe_math.h" 1
17322   # 12 "include/internal/safe_math.h"
17323           
17324   # 17 "include/internal/time.h" 2
17325   # 25 "include/internal/time.h"
17326   typedef struct {
17327       uint64_t t;
17328   } OSSL_TIME;
17329   # 53 "include/internal/time.h"
17330   static inline __attribute__((unused)) uint64_t safe_add_time(uint64_t a, uint64_t b, int *err) { uint64_t r; if (!__builtin_add_overflow(a, b, &r)) return r; *err |= 1; return a + b; } static inline __attribute__((unused)) uint64_t safe_sub_time(uint64_t a, uint64_t b, int *err) { if (b > a) *err |= 1; return a - b; } static inline __attribute__((unused)) uint64_t safe_mul_time(uint64_t a, uint64_t b, int *err) { uint64_t r; if (!__builtin_mul_overflow(a, b, &r)) return r; *err |= 1; return a * b; } static inline __attribute__((unused)) uint64_t safe_div_time(uint64_t a, uint64_t b, int *err) { if (b != 0) return a / b; *err |= 1; return (~(uint64_t)0); } static inline __attribute__((unused)) uint64_t safe_mod_time(uint64_t a, uint64_t b, int *err) { if (b != 0) return a % b; *err |= 1; return 0; } static inline __attribute__((unused)) uint64_t safe_div_round_up_time (uint64_t a, uint64_t b, int *errp) { uint64_t x; int *err, err_local = 0; err = errp != 
17331   # 53 "include/internal/time.h" 3 4
17332   ((void *)0) 
17333   # 53 "include/internal/time.h"
17334   ? errp : &err_local; if (b > 0 && a > 0) { if (a < (~(uint64_t)0) - b) return (a + b - 1) / b; return a / b + (a % b != 0); } if (b == 0) { *err |= 1; return a == 0 ? 0 : (~(uint64_t)0); } if (a == 0) return 0; x = safe_mod_time(a, b, err); return safe_add_time(safe_div_time(a, b, err), x != 0, err); } static inline __attribute__((unused)) uint64_t safe_muldiv_time(uint64_t a, uint64_t b, uint64_t c, int *err) { int e2 = 0; uint64_t x, y; if (c == 0) { *err |= 1; return a == 0 || b == 0 ? 0 : (~(uint64_t)0); } x = safe_mul_time(a, b, &e2); if (!e2) return x / c; if (b > a) { x = b; b = a; a = x; } x = safe_mul_time(a % c, b, err); y = safe_mul_time(a / c, b, err); return safe_add_time(y, x / c, err); } static inline __attribute__((unused)) uint64_t safe_neg_time(uint64_t a, int *err) { if (a == 0) return a; *err |= 1; return 1 + ~a; } static inline __attribute__((unused)) uint64_t safe_abs_time(uint64_t a, int *err) { return a; }
17335   
17336   
17337   static __attribute__((unused)) inline
17338   OSSL_TIME ossl_ticks2time(uint64_t ticks)
17339   {
17340       OSSL_TIME r;
17341   
17342       r.t = ticks;
17343       return r;
17344   }
17345   
17346   
17347   static __attribute__((unused)) inline
17348   uint64_t ossl_time2ticks(OSSL_TIME t)
17349   {
17350       return t.t;
17351   }
17352   
17353   
17354   OSSL_TIME ossl_time_now(void);
17355   
17356   
17357   static __attribute__((unused)) inline
17358   OSSL_TIME ossl_time_zero(void)
17359   {
17360       return ossl_ticks2time(0);
17361   }
17362   
17363   static __attribute__((unused)) inline
17364   OSSL_TIME ossl_time_infinite(void)
17365   {
17366       return ossl_ticks2time(~(uint64_t)0);
17367   }
17368   
17369   
17370   
17371   static __attribute__((unused)) inline
17372   struct timeval ossl_time_to_timeval(OSSL_TIME t)
17373   {
17374       struct timeval tv;
17375       int err = 0;
17376   
17377   
17378   
17379   
17380   
17381       t.t = safe_add_time(t.t, ((((uint64_t)1000000000) / 1000) / 1000) - 1, &err);
17382       if (err)
17383           t = ossl_time_infinite();
17384   
17385   
17386   
17387   
17388       tv.tv_sec = (time_t)(t.t / ((uint64_t)1000000000));
17389   
17390       tv.tv_usec = (t.t % ((uint64_t)1000000000)) / ((((uint64_t)1000000000) / 1000) / 1000);
17391       return tv;
17392   }
17393   
17394   
17395   static __attribute__((unused)) inline
17396   OSSL_TIME ossl_time_from_timeval(struct timeval tv)
17397   {
17398       OSSL_TIME t;
17399   
17400   
17401       if (tv.tv_sec < 0)
17402           return ossl_time_zero();
17403   
17404       t.t = tv.tv_sec * ((uint64_t)1000000000) + tv.tv_usec * ((((uint64_t)1000000000) / 1000) / 1000);
17405       return t;
17406   }
17407   
17408   
17409   static __attribute__((unused)) inline
17410   time_t ossl_time_to_time_t(OSSL_TIME t)
17411   {
17412       return (time_t)(t.t / ((uint64_t)1000000000));
17413   }
17414   
17415   
17416   static __attribute__((unused)) inline
17417   OSSL_TIME ossl_time_from_time_t(time_t t)
17418   {
17419       OSSL_TIME ot;
17420   
17421       ot.t = t;
17422       ot.t *= ((uint64_t)1000000000);
17423       return ot;
17424   }
17425   
17426   
17427   static __attribute__((unused)) inline
17428   int ossl_time_compare(OSSL_TIME a, OSSL_TIME b)
17429   {
17430       if (a.t > b.t)
17431           return 1;
17432       if (a.t < b.t)
17433           return -1;
17434       return 0;
17435   }
17436   
17437   
17438   static __attribute__((unused)) inline
17439   int ossl_time_is_zero(OSSL_TIME t)
17440   {
17441       return ossl_time_compare(t, ossl_time_zero()) == 0;
17442   }
17443   
17444   
17445   static __attribute__((unused)) inline
17446   int ossl_time_is_infinite(OSSL_TIME t)
17447   {
17448       return ossl_time_compare(t, ossl_time_infinite()) == 0;
17449   }
17450   
17451   static __attribute__((unused)) inline
17452   OSSL_TIME ossl_time_add(OSSL_TIME a, OSSL_TIME b)
17453   {
17454       OSSL_TIME r;
17455       int err = 0;
17456   
17457       r.t = safe_add_time(a.t, b.t, &err);
17458       return err ? ossl_time_infinite() : r;
17459   }
17460   
17461   static __attribute__((unused)) inline
17462   OSSL_TIME ossl_time_subtract(OSSL_TIME a, OSSL_TIME b)
17463   {
17464       OSSL_TIME r;
17465       int err = 0;
17466   
17467       r.t = safe_sub_time(a.t, b.t, &err);
17468       return err ? ossl_time_zero() : r;
17469   }
17470   
17471   
17472   static __attribute__((unused)) inline
17473   OSSL_TIME ossl_time_abs_difference(OSSL_TIME a, OSSL_TIME b)
17474   {
17475       return a.t > b.t ? ossl_time_subtract(a, b)
17476                        : ossl_time_subtract(b, a);
17477   }
17478   
17479   static __attribute__((unused)) inline
17480   OSSL_TIME ossl_time_multiply(OSSL_TIME a, uint64_t b)
17481   {
17482       OSSL_TIME r;
17483       int err = 0;
17484   
17485       r.t = safe_mul_time(a.t, b, &err);
17486       return err ? ossl_time_infinite() : r;
17487   }
17488   
17489   static __attribute__((unused)) inline
17490   OSSL_TIME ossl_time_divide(OSSL_TIME a, uint64_t b)
17491   {
17492       OSSL_TIME r;
17493       int err = 0;
17494   
17495       r.t = safe_div_time(a.t, b, &err);
17496       return err ? ossl_time_zero() : r;
17497   }
17498   
17499   static __attribute__((unused)) inline
17500   OSSL_TIME ossl_time_muldiv(OSSL_TIME a, uint64_t b, uint64_t c)
17501   {
17502       OSSL_TIME r;
17503       int err = 0;
17504   
17505       r.t = safe_muldiv_time(a.t, b, c, &err);
17506       return err ? ossl_time_zero() : r;
17507   }
17508   
17509   
17510   static __attribute__((unused)) inline
17511   OSSL_TIME ossl_time_max(OSSL_TIME a, OSSL_TIME b)
17512   {
17513       return a.t > b.t ? a : b;
17514   }
17515   
17516   
17517   static __attribute__((unused)) inline
17518   OSSL_TIME ossl_time_min(OSSL_TIME a, OSSL_TIME b)
17519   {
17520       return a.t < b.t ? a : b;
17521   }
17522   # 39 "ssl/ssl_local.h" 2
17523   # 1 "include/internal/ssl.h" 1
17524   # 14 "include/internal/ssl.h"
17525           
17526   
17527   typedef void (*ossl_msg_cb)(int write_p, int version, int content_type,
17528                               const void *buf, size_t len, SSL *ssl, void *arg);
17529   
17530   int ossl_ssl_get_error(const SSL *s, int i, int check_err);
17531   # 40 "ssl/ssl_local.h" 2
17532   # 1 "ssl/record/record.h" 1
17533   # 22 "ssl/record/record.h"
17534   typedef struct tls_record_st {
17535       void *rechandle;
17536       int version;
17537       uint8_t type;
17538   
17539       const unsigned char *data;
17540   
17541   
17542   
17543   
17544       unsigned char *allocdata;
17545   
17546       size_t length;
17547   
17548       size_t off;
17549   
17550       uint16_t epoch;
17551   
17552       unsigned char seq_num[8];
17553   
17554   
17555   
17556   } TLS_RECORD;
17557   
17558   typedef struct dtls_record_layer_st {
17559   
17560   
17561   
17562   
17563   
17564       uint16_t r_epoch;
17565       uint16_t w_epoch;
17566   
17567   
17568   
17569   
17570   
17571   
17572       struct pqueue_st *buffered_app_data;
17573   } DTLS_RECORD_LAYER;
17574   # 71 "ssl/record/record.h"
17575   typedef struct record_layer_st {
17576   
17577       SSL_CONNECTION *s;
17578   
17579   
17580       const OSSL_RECORD_METHOD *custom_rlmethod;
17581   
17582       void *rlarg;
17583   
17584       const OSSL_RECORD_METHOD *rrlmethod;
17585   
17586       const OSSL_RECORD_METHOD *wrlmethod;
17587   
17588       OSSL_RECORD_LAYER *rrl;
17589   
17590       OSSL_RECORD_LAYER *wrl;
17591   
17592       BIO *rrlnext;
17593   
17594       size_t default_read_buf_len;
17595   
17596   
17597   
17598   
17599   
17600       int read_ahead;
17601   
17602   
17603       size_t wnum;
17604       unsigned char handshake_fragment[4];
17605       size_t handshake_fragment_len;
17606   
17607   
17608       size_t wpend_tot;
17609       uint8_t wpend_type;
17610       const unsigned char *wpend_buf;
17611   
17612   
17613       unsigned int alert_count;
17614       DTLS_RECORD_LAYER *d;
17615   
17616   
17617       size_t (*record_padding_cb)(SSL *s, int type, size_t len, void *arg);
17618       void *record_padding_arg;
17619       size_t block_padding;
17620   
17621   
17622       size_t num_recs;
17623   
17624       size_t curr_rec;
17625   
17626       TLS_RECORD tlsrecs[32];
17627   
17628   } RECORD_LAYER;
17629   # 136 "ssl/record/record.h"
17630   void RECORD_LAYER_init(RECORD_LAYER *rl, SSL_CONNECTION *s);
17631   int RECORD_LAYER_clear(RECORD_LAYER *rl);
17632   int RECORD_LAYER_reset(RECORD_LAYER *rl);
17633   int RECORD_LAYER_read_pending(const RECORD_LAYER *rl);
17634   int RECORD_LAYER_processed_read_pending(const RECORD_LAYER *rl);
17635   int RECORD_LAYER_write_pending(const RECORD_LAYER *rl);
17636   int RECORD_LAYER_is_sslv2_record(RECORD_LAYER *rl);
17637    size_t ssl3_pending(const SSL *s);
17638    int ssl3_write_bytes(SSL *s, uint8_t type, const void *buf, size_t len,
17639                               size_t *written);
17640    int ssl3_read_bytes(SSL *s, uint8_t type, uint8_t *recvd_type,
17641                              unsigned char *buf, size_t len, int peek,
17642                              size_t *readbytes);
17643   
17644   int DTLS_RECORD_LAYER_new(RECORD_LAYER *rl);
17645   void DTLS_RECORD_LAYER_free(RECORD_LAYER *rl);
17646   void DTLS_RECORD_LAYER_clear(RECORD_LAYER *rl);
17647    int dtls1_read_bytes(SSL *s, uint8_t type, uint8_t *recvd_type,
17648                               unsigned char *buf, size_t len, int peek,
17649                               size_t *readbytes);
17650    int dtls1_write_bytes(SSL_CONNECTION *s, uint8_t type, const void *buf,
17651                                size_t len, size_t *written);
17652   int do_dtls1_write(SSL_CONNECTION *s, uint8_t type, const unsigned char *buf,
17653                      size_t len, size_t *written);
17654   void dtls1_increment_epoch(SSL_CONNECTION *s, int rw);
17655   uint16_t dtls1_get_epoch(SSL_CONNECTION *s, int rw);
17656   int ssl_release_record(SSL_CONNECTION *s, TLS_RECORD *rr, size_t length);
17657   
17658   
17659   
17660   
17661   
17662   
17663   
17664   int ossl_tls_handle_rlayer_return(SSL_CONNECTION *s, int writing, int ret,
17665                                     char *file, int line);
17666   
17667   int ssl_set_new_record_layer(SSL_CONNECTION *s, int version,
17668                                int direction, int level,
17669                                unsigned char *secret, size_t secretlen,
17670                                unsigned char *key, size_t keylen,
17671                                unsigned char *iv, size_t ivlen,
17672                                unsigned char *mackey, size_t mackeylen,
17673                                const EVP_CIPHER *ciph, size_t taglen,
17674                                int mactype, const EVP_MD *md,
17675                                const SSL_COMP *comp, const EVP_MD *kdfdigest);
17676   int ssl_set_record_protocol_version(SSL_CONNECTION *s, int vers);
17677   
17678   
17679   typedef int (OSSL_FUNC_rlayer_skip_early_data_fn)(void *cbarg); static __attribute__((unused)) inline OSSL_FUNC_rlayer_skip_early_data_fn *OSSL_FUNC_rlayer_skip_early_data(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rlayer_skip_early_data_fn *)opf->function; }
17680   
17681   typedef void (OSSL_FUNC_rlayer_msg_callback_fn)(int write_p, int version, int content_type, const void *buf, size_t len, void *cbarg); static __attribute__((unused)) inline OSSL_FUNC_rlayer_msg_callback_fn *OSSL_FUNC_rlayer_msg_callback(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rlayer_msg_callback_fn *)opf->function; }
17682   
17683   
17684   
17685   
17686   typedef int (OSSL_FUNC_rlayer_security_fn)(void *cbarg, int op, int bits, int nid, void *other); static __attribute__((unused)) inline OSSL_FUNC_rlayer_security_fn *OSSL_FUNC_rlayer_security(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rlayer_security_fn *)opf->function; }
17687   
17688   
17689   typedef size_t (OSSL_FUNC_rlayer_padding_fn)(void *cbarg, int type, size_t len); static __attribute__((unused)) inline OSSL_FUNC_rlayer_padding_fn *OSSL_FUNC_rlayer_padding(const OSSL_DISPATCH *opf) { return (OSSL_FUNC_rlayer_padding_fn *)opf->function; }
17690   # 41 "ssl/ssl_local.h" 2
17691   # 386 "ssl/ssl_local.h"
17692   typedef enum {
17693       SSL_PHA_NONE = 0,
17694       SSL_PHA_EXT_SENT,
17695       SSL_PHA_EXT_RECEIVED,
17696       SSL_PHA_REQUEST_PENDING,
17697       SSL_PHA_REQUESTED
17698   } SSL_PHA_STATE;
17699   
17700   
17701   
17702   
17703   struct ssl_cipher_st {
17704       uint32_t valid;
17705       const char *name;
17706       const char *stdname;
17707       uint32_t id;
17708   
17709   
17710   
17711   
17712       uint32_t algorithm_mkey;
17713       uint32_t algorithm_auth;
17714       uint32_t algorithm_enc;
17715       uint32_t algorithm_mac;
17716       int min_tls;
17717       int max_tls;
17718       int min_dtls;
17719       int max_dtls;
17720       uint32_t algo_strength;
17721       uint32_t algorithm2;
17722       int32_t strength_bits;
17723       uint32_t alg_bits;
17724   };
17725   
17726   
17727   struct ssl_method_st {
17728       int version;
17729       unsigned flags;
17730       unsigned long mask;
17731       SSL *(*ssl_new) (SSL_CTX *ctx);
17732       void (*ssl_free) (SSL *s);
17733       int (*ssl_reset) (SSL *s);
17734       int (*ssl_init) (SSL *s);
17735       int (*ssl_clear) (SSL *s);
17736       void (*ssl_deinit) (SSL *s);
17737       int (*ssl_accept) (SSL *s);
17738       int (*ssl_connect) (SSL *s);
17739       int (*ssl_read) (SSL *s, void *buf, size_t len, size_t *readbytes);
17740       int (*ssl_peek) (SSL *s, void *buf, size_t len, size_t *readbytes);
17741       int (*ssl_write) (SSL *s, const void *buf, size_t len, size_t *written);
17742       int (*ssl_shutdown) (SSL *s);
17743       int (*ssl_renegotiate) (SSL *s);
17744       int (*ssl_renegotiate_check) (SSL *s, int);
17745       int (*ssl_read_bytes) (SSL *s, uint8_t type, uint8_t *recvd_type,
17746                              unsigned char *buf, size_t len, int peek,
17747                              size_t *readbytes);
17748       int (*ssl_write_bytes) (SSL *s, uint8_t type, const void *buf_, size_t len,
17749                               size_t *written);
17750       int (*ssl_dispatch_alert) (SSL *s);
17751       long (*ssl_ctrl) (SSL *s, int cmd, long larg, void *parg);
17752       long (*ssl_ctx_ctrl) (SSL_CTX *ctx, int cmd, long larg, void *parg);
17753       const SSL_CIPHER *(*get_cipher_by_char) (const unsigned char *ptr);
17754       int (*put_cipher_by_char) (const SSL_CIPHER *cipher, WPACKET *pkt,
17755                                  size_t *len);
17756       size_t (*ssl_pending) (const SSL *s);
17757       int (*num_ciphers) (void);
17758       const SSL_CIPHER *(*get_cipher) (unsigned ncipher);
17759       OSSL_TIME (*get_timeout) (void);
17760       const struct ssl3_enc_method *ssl3_enc;
17761       int (*ssl_version) (void);
17762       long (*ssl_callback_ctrl) (SSL *s, int cb_id, void (*fp) (void));
17763       long (*ssl_ctx_callback_ctrl) (SSL_CTX *s, int cb_id, void (*fp) (void));
17764   };
17765   # 492 "ssl/ssl_local.h"
17766   struct ssl_session_st {
17767       int ssl_version;
17768   
17769       size_t master_key_length;
17770   
17771   
17772       unsigned char early_secret[64];
17773   
17774   
17775   
17776   
17777       unsigned char master_key[512];
17778   
17779       size_t session_id_length;
17780       unsigned char session_id[32];
17781   
17782   
17783   
17784   
17785   
17786       size_t sid_ctx_length;
17787       unsigned char sid_ctx[32];
17788   
17789       char *psk_identity_hint;
17790       char *psk_identity;
17791   
17792   
17793   
17794   
17795   
17796   
17797       int not_resumable;
17798   
17799       EVP_PKEY *peer_rpk;
17800   
17801       X509 *peer;
17802   
17803       struct stack_st_X509 *peer_chain;
17804   
17805   
17806   
17807   
17808       long verify_result;
17809       CRYPTO_REF_COUNT references;
17810       OSSL_TIME timeout;
17811       OSSL_TIME time;
17812       OSSL_TIME calc_timeout;
17813       unsigned int compress_meth;
17814       const SSL_CIPHER *cipher;
17815       unsigned long cipher_id;
17816   
17817       unsigned int kex_group;
17818       CRYPTO_EX_DATA ex_data;
17819   
17820   
17821   
17822   
17823       struct ssl_session_st *prev, *next;
17824   
17825       struct {
17826           char *hostname;
17827   
17828           unsigned char *tick;
17829           size_t ticklen;
17830   
17831           unsigned long tick_lifetime_hint;
17832           uint32_t tick_age_add;
17833   
17834           uint32_t max_early_data;
17835   
17836           unsigned char *alpn_selected;
17837           size_t alpn_selected_len;
17838   
17839   
17840   
17841   
17842   
17843   
17844           uint8_t max_fragment_len_mode;
17845       } ext;
17846   
17847       char *srp_username;
17848   
17849       unsigned char *ticket_appdata;
17850       size_t ticket_appdata_len;
17851       uint32_t flags;
17852       SSL_CTX *owner;
17853   };
17854   
17855   
17856   
17857   
17858   
17859   
17860   typedef struct srp_ctx_st {
17861   
17862       void *SRP_cb_arg;
17863   
17864       int (*TLS_ext_srp_username_callback) (SSL *, int *, void *);
17865   
17866       int (*SRP_verify_param_callback) (SSL *, void *);
17867   
17868       char *(*SRP_give_srp_client_pwd_callback) (SSL *, void *);
17869       char *login;
17870       BIGNUM *N, *g, *s, *B, *A;
17871       BIGNUM *a, *b, *v;
17872       char *info;
17873       int strength;
17874       unsigned long srp_Mask;
17875   } SRP_CTX;
17876   
17877   
17878   
17879   typedef enum {
17880       SSL_EARLY_DATA_NONE = 0,
17881       SSL_EARLY_DATA_CONNECT_RETRY,
17882       SSL_EARLY_DATA_CONNECTING,
17883       SSL_EARLY_DATA_WRITE_RETRY,
17884       SSL_EARLY_DATA_WRITING,
17885       SSL_EARLY_DATA_WRITE_FLUSH,
17886       SSL_EARLY_DATA_UNAUTH_WRITING,
17887       SSL_EARLY_DATA_FINISHED_WRITING,
17888       SSL_EARLY_DATA_ACCEPT_RETRY,
17889       SSL_EARLY_DATA_ACCEPTING,
17890       SSL_EARLY_DATA_READ_RETRY,
17891       SSL_EARLY_DATA_READING,
17892       SSL_EARLY_DATA_FINISHED_READING
17893   } SSL_EARLY_DATA_STATE;
17894   # 643 "ssl/ssl_local.h"
17895   struct ssl_comp_st {
17896       int id;
17897       const char *name;
17898       COMP_METHOD *method;
17899   };
17900   
17901   typedef struct raw_extension_st {
17902   
17903       PACKET data;
17904   
17905       int present;
17906   
17907       int parsed;
17908   
17909       unsigned int type;
17910   
17911       size_t received_order;
17912   } RAW_EXTENSION;
17913   
17914   typedef struct {
17915       unsigned int isv2;
17916       unsigned int legacy_version;
17917       unsigned char random[32];
17918       size_t session_id_len;
17919       unsigned char session_id[32];
17920       size_t dtls_cookie_len;
17921       unsigned char dtls_cookie[255];
17922       PACKET ciphersuites;
17923       size_t compressions_len;
17924       unsigned char compressions[255];
17925       PACKET extensions;
17926       size_t pre_proc_exts_len;
17927       RAW_EXTENSION *pre_proc_exts;
17928   } CLIENTHELLO_MSG;
17929   
17930   
17931   
17932   
17933   
17934   typedef enum tlsext_index_en {
17935       TLSEXT_IDX_renegotiate,
17936       TLSEXT_IDX_server_name,
17937       TLSEXT_IDX_max_fragment_length,
17938       TLSEXT_IDX_srp,
17939       TLSEXT_IDX_ec_point_formats,
17940       TLSEXT_IDX_supported_groups,
17941       TLSEXT_IDX_session_ticket,
17942       TLSEXT_IDX_status_request,
17943       TLSEXT_IDX_next_proto_neg,
17944       TLSEXT_IDX_application_layer_protocol_negotiation,
17945       TLSEXT_IDX_use_srtp,
17946       TLSEXT_IDX_encrypt_then_mac,
17947       TLSEXT_IDX_signed_certificate_timestamp,
17948       TLSEXT_IDX_extended_master_secret,
17949       TLSEXT_IDX_signature_algorithms_cert,
17950       TLSEXT_IDX_post_handshake_auth,
17951       TLSEXT_IDX_client_cert_type,
17952       TLSEXT_IDX_server_cert_type,
17953       TLSEXT_IDX_signature_algorithms,
17954       TLSEXT_IDX_supported_versions,
17955       TLSEXT_IDX_psk_kex_modes,
17956       TLSEXT_IDX_key_share,
17957       TLSEXT_IDX_cookie,
17958       TLSEXT_IDX_cryptopro_bug,
17959       TLSEXT_IDX_compress_certificate,
17960       TLSEXT_IDX_early_data,
17961       TLSEXT_IDX_certificate_authorities,
17962       TLSEXT_IDX_padding,
17963       TLSEXT_IDX_psk,
17964   
17965       TLSEXT_IDX_num_builtins
17966   } TLSEXT_INDEX;
17967   
17968   struct lhash_st_SSL_SESSION { union lh_SSL_SESSION_dummy { void* d1; unsigned long d2; int d3; } dummy; }; static unsigned long lh_SSL_SESSION_hfn_thunk(const void *data, OPENSSL_LH_HASHFUNC hfn) { unsigned long (*hfn_conv)(const SSL_SESSION *) = (unsigned long (*)(const SSL_SESSION *))hfn; return hfn_conv((const SSL_SESSION *)data); } static int lh_SSL_SESSION_cfn_thunk(const void *da, const void *db, OPENSSL_LH_COMPFUNC cfn) { int (*cfn_conv)(const SSL_SESSION *, const SSL_SESSION *) = (int (*)(const SSL_SESSION *, const SSL_SESSION *))cfn; return cfn_conv((const SSL_SESSION *)da, (const SSL_SESSION *)db); } static __attribute__((unused)) inline void lh_SSL_SESSION_free(struct lhash_st_SSL_SESSION *lh) { OPENSSL_LH_free((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline void lh_SSL_SESSION_flush(struct lhash_st_SSL_SESSION *lh) { OPENSSL_LH_flush((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline SSL_SESSION * lh_SSL_SESSION_insert(struct lhash_st_SSL_SESSION *lh, SSL_SESSION *d) { return (SSL_SESSION *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d); } static __attribute__((unused)) inline SSL_SESSION * lh_SSL_SESSION_delete(struct lhash_st_SSL_SESSION *lh, const SSL_SESSION *d) { return (SSL_SESSION *)OPENSSL_LH_delete((OPENSSL_LHASH *)lh, d); } static __attribute__((unused)) inline SSL_SESSION * lh_SSL_SESSION_retrieve(struct lhash_st_SSL_SESSION *lh, const SSL_SESSION *d) { return (SSL_SESSION *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d); } static __attribute__((unused)) inline int lh_SSL_SESSION_error(struct lhash_st_SSL_SESSION *lh) { return OPENSSL_LH_error((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline unsigned long lh_SSL_SESSION_num_items(struct lhash_st_SSL_SESSION *lh) { return OPENSSL_LH_num_items((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline unsigned long lh_SSL_SESSION_get_down_load(struct lhash_st_SSL_SESSION *lh) { return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline void lh_SSL_SESSION_set_down_load(struct lhash_st_SSL_SESSION *lh, unsigned long dl) { OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl); } static __attribute__((unused)) inline void lh_SSL_SESSION_doall_thunk(void *node, OPENSSL_LH_DOALL_FUNC doall) { void (*doall_conv)(SSL_SESSION *) = (void (*)(SSL_SESSION *))doall; doall_conv((SSL_SESSION *)node); } static __attribute__((unused)) inline void lh_SSL_SESSION_doall_arg_thunk(void *node, void *arg, OPENSSL_LH_DOALL_FUNCARG doall) { void (*doall_conv)(SSL_SESSION *, void *) = (void (*)(SSL_SESSION *, void *))doall; doall_conv((SSL_SESSION *)node, arg); } static __attribute__((unused)) inline void lh_SSL_SESSION_doall(struct lhash_st_SSL_SESSION *lh, void (*doall)(SSL_SESSION *)) { OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall); } static __attribute__((unused)) inline struct lhash_st_SSL_SESSION * lh_SSL_SESSION_new(unsigned long (*hfn)(const SSL_SESSION *), int (*cfn)(const SSL_SESSION *, const SSL_SESSION *)) { return (struct lhash_st_SSL_SESSION *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), lh_SSL_SESSION_hfn_thunk, lh_SSL_SESSION_cfn_thunk, lh_SSL_SESSION_doall_thunk, lh_SSL_SESSION_doall_arg_thunk); } static __attribute__((unused)) inline void lh_SSL_SESSION_doall_arg(struct lhash_st_SSL_SESSION *lh, void (*doallarg)(SSL_SESSION *, void *), void *arg) { OPENSSL_LH_doall_arg((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNCARG)doallarg, arg); } struct lhash_st_SSL_SESSION;
17969   
17970   struct lhash_st_X509_NAME { union lh_X509_NAME_dummy { void* d1; unsigned long d2; int d3; } dummy; }; static unsigned long lh_X509_NAME_hfn_thunk(const void *data, OPENSSL_LH_HASHFUNC hfn) { unsigned long (*hfn_conv)(const X509_NAME *) = (unsigned long (*)(const X509_NAME *))hfn; return hfn_conv((const X509_NAME *)data); } static int lh_X509_NAME_cfn_thunk(const void *da, const void *db, OPENSSL_LH_COMPFUNC cfn) { int (*cfn_conv)(const X509_NAME *, const X509_NAME *) = (int (*)(const X509_NAME *, const X509_NAME *))cfn; return cfn_conv((const X509_NAME *)da, (const X509_NAME *)db); } static __attribute__((unused)) inline void lh_X509_NAME_free(struct lhash_st_X509_NAME *lh) { OPENSSL_LH_free((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline void lh_X509_NAME_flush(struct lhash_st_X509_NAME *lh) { OPENSSL_LH_flush((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline X509_NAME * lh_X509_NAME_insert(struct lhash_st_X509_NAME *lh, X509_NAME *d) { return (X509_NAME *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d); } static __attribute__((unused)) inline X509_NAME * lh_X509_NAME_delete(struct lhash_st_X509_NAME *lh, const X509_NAME *d) { return (X509_NAME *)OPENSSL_LH_delete((OPENSSL_LHASH *)lh, d); } static __attribute__((unused)) inline X509_NAME * lh_X509_NAME_retrieve(struct lhash_st_X509_NAME *lh, const X509_NAME *d) { return (X509_NAME *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d); } static __attribute__((unused)) inline int lh_X509_NAME_error(struct lhash_st_X509_NAME *lh) { return OPENSSL_LH_error((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline unsigned long lh_X509_NAME_num_items(struct lhash_st_X509_NAME *lh) { return OPENSSL_LH_num_items((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline unsigned long lh_X509_NAME_get_down_load(struct lhash_st_X509_NAME *lh) { return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline void lh_X509_NAME_set_down_load(struct lhash_st_X509_NAME *lh, unsigned long dl) { OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl); } static __attribute__((unused)) inline void lh_X509_NAME_doall_thunk(void *node, OPENSSL_LH_DOALL_FUNC doall) { void (*doall_conv)(X509_NAME *) = (void (*)(X509_NAME *))doall; doall_conv((X509_NAME *)node); } static __attribute__((unused)) inline void lh_X509_NAME_doall_arg_thunk(void *node, void *arg, OPENSSL_LH_DOALL_FUNCARG doall) { void (*doall_conv)(X509_NAME *, void *) = (void (*)(X509_NAME *, void *))doall; doall_conv((X509_NAME *)node, arg); } static __attribute__((unused)) inline void lh_X509_NAME_doall(struct lhash_st_X509_NAME *lh, void (*doall)(X509_NAME *)) { OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall); } static __attribute__((unused)) inline struct lhash_st_X509_NAME * lh_X509_NAME_new(unsigned long (*hfn)(const X509_NAME *), int (*cfn)(const X509_NAME *, const X509_NAME *)) { return (struct lhash_st_X509_NAME *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), lh_X509_NAME_hfn_thunk, lh_X509_NAME_cfn_thunk, lh_X509_NAME_doall_thunk, lh_X509_NAME_doall_arg_thunk); } static __attribute__((unused)) inline void lh_X509_NAME_doall_arg(struct lhash_st_X509_NAME *lh, void (*doallarg)(X509_NAME *, void *), void *arg) { OPENSSL_LH_doall_arg((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNCARG)doallarg, arg); } struct lhash_st_X509_NAME;
17971   
17972   
17973   
17974   
17975   typedef struct ssl_ctx_ext_secure_st {
17976       unsigned char tick_hmac_key[32];
17977       unsigned char tick_aes_key[32];
17978   } SSL_CTX_EXT_SECURE;
17979   # 735 "ssl/ssl_local.h"
17980   typedef struct ssl_hmac_st {
17981       EVP_MAC_CTX *ctx;
17982   
17983       HMAC_CTX *old_ctx;
17984   
17985   } SSL_HMAC;
17986   
17987   SSL_HMAC *ssl_hmac_new(const SSL_CTX *ctx);
17988   void ssl_hmac_free(SSL_HMAC *ctx);
17989   
17990   HMAC_CTX *ssl_hmac_get0_HMAC_CTX(SSL_HMAC *ctx);
17991   
17992   EVP_MAC_CTX *ssl_hmac_get0_EVP_MAC_CTX(SSL_HMAC *ctx);
17993   int ssl_hmac_init(SSL_HMAC *ctx, void *key, size_t len, char *md);
17994   int ssl_hmac_update(SSL_HMAC *ctx, const unsigned char *data, size_t len);
17995   int ssl_hmac_final(SSL_HMAC *ctx, unsigned char *md, size_t *len,
17996                      size_t max_size);
17997   size_t ssl_hmac_size(const SSL_HMAC *ctx);
17998   
17999   int ssl_get_EC_curve_nid(const EVP_PKEY *pkey);
18000    int tls13_set_encoded_pub_key(EVP_PKEY *pkey,
18001                                        const unsigned char *enckey,
18002                                        size_t enckeylen);
18003   
18004   typedef struct tls_group_info_st {
18005       char *tlsname;
18006       char *realname;
18007       char *algorithm;
18008       unsigned int secbits;
18009       uint16_t group_id;
18010       int mintls;
18011       int maxtls;
18012       int mindtls;
18013       int maxdtls;
18014       char is_kem;
18015   } TLS_GROUP_INFO;
18016   
18017   typedef struct tls_sigalg_info_st {
18018       char *name;
18019       uint16_t code_point;
18020       char *sigalg_name;
18021       char *sigalg_oid;
18022       char *sig_name;
18023       char *sig_oid;
18024       char *hash_name;
18025       char *hash_oid;
18026       char *keytype;
18027       char *keytype_oid;
18028       unsigned int secbits;
18029       int mintls;
18030       int maxtls;
18031   } TLS_SIGALG_INFO;
18032   
18033   
18034   
18035   
18036   
18037   typedef struct {
18038       int nid;
18039       uint32_t amask;
18040   } SSL_CERT_LOOKUP;
18041   # 807 "ssl/ssl_local.h"
18042   struct ssl_ctx_st {
18043       OSSL_LIB_CTX *libctx;
18044   
18045       const SSL_METHOD *method;
18046       struct stack_st_SSL_CIPHER *cipher_list;
18047   
18048       struct stack_st_SSL_CIPHER *cipher_list_by_id;
18049   
18050       struct stack_st_SSL_CIPHER *tls13_ciphersuites;
18051       struct x509_store_st *cert_store;
18052       struct lhash_st_SSL_SESSION *sessions;
18053   
18054   
18055   
18056   
18057       size_t session_cache_size;
18058       struct ssl_session_st *session_cache_head;
18059       struct ssl_session_st *session_cache_tail;
18060   
18061   
18062   
18063   
18064   
18065       uint32_t session_cache_mode;
18066   
18067   
18068   
18069   
18070   
18071       OSSL_TIME session_timeout;
18072   # 846 "ssl/ssl_local.h"
18073       int (*new_session_cb) (struct ssl_st *ssl, SSL_SESSION *sess);
18074       void (*remove_session_cb) (struct ssl_ctx_st *ctx, SSL_SESSION *sess);
18075       SSL_SESSION *(*get_session_cb) (struct ssl_st *ssl,
18076                                       const unsigned char *data, int len,
18077                                       int *copy);
18078       struct {
18079           _Atomic int sess_connect;
18080           _Atomic int sess_connect_renegotiate;
18081           _Atomic int sess_connect_good;
18082           _Atomic int sess_accept;
18083           _Atomic int sess_accept_renegotiate;
18084           _Atomic int sess_accept_good;
18085           _Atomic int sess_miss;
18086           _Atomic int sess_timeout;
18087           _Atomic int sess_cache_full;
18088           _Atomic int sess_hit;
18089           _Atomic int sess_cb_hit;
18090   
18091   
18092   
18093   
18094   
18095   
18096       } stats;
18097   
18098   
18099   
18100   
18101       CRYPTO_REF_COUNT references;
18102   
18103   
18104       int (*app_verify_callback) (X509_STORE_CTX *, void *);
18105       void *app_verify_arg;
18106   
18107   
18108   
18109   
18110   
18111   
18112       pem_password_cb *default_passwd_callback;
18113   
18114   
18115       void *default_passwd_callback_userdata;
18116   
18117   
18118       int (*client_cert_cb) (SSL *ssl, X509 **x509, EVP_PKEY **pkey);
18119   
18120   
18121       int (*app_gen_cookie_cb) (SSL *ssl, unsigned char *cookie,
18122                                 unsigned int *cookie_len);
18123   
18124   
18125       int (*app_verify_cookie_cb) (SSL *ssl, const unsigned char *cookie,
18126                                    unsigned int cookie_len);
18127   
18128   
18129       int (*gen_stateless_cookie_cb) (SSL *ssl, unsigned char *cookie,
18130                                       size_t *cookie_len);
18131   
18132   
18133       int (*verify_stateless_cookie_cb) (SSL *ssl, const unsigned char *cookie,
18134                                          size_t cookie_len);
18135   
18136       CRYPTO_EX_DATA ex_data;
18137   
18138       const EVP_MD *md5;
18139       const EVP_MD *sha1;
18140   
18141       struct stack_st_X509 *extra_certs;
18142       struct stack_st_SSL_COMP *comp_methods;
18143   
18144   
18145   
18146   
18147       void (*info_callback) (const SSL *ssl, int type, int val);
18148   
18149   
18150   
18151   
18152   
18153   
18154   
18155       struct stack_st_X509_NAME *ca_names;
18156       struct stack_st_X509_NAME *client_ca_names;
18157   
18158   
18159   
18160   
18161   
18162   
18163       uint64_t options;
18164       uint32_t mode;
18165       int min_proto_version;
18166       int max_proto_version;
18167       size_t max_cert_list;
18168   
18169       struct cert_st *cert;
18170       SSL_CERT_LOOKUP *ssl_cert_info;
18171       int read_ahead;
18172   
18173   
18174       ossl_msg_cb msg_callback;
18175       void *msg_callback_arg;
18176   
18177       uint32_t verify_mode;
18178       size_t sid_ctx_length;
18179       unsigned char sid_ctx[32];
18180   
18181       int (*default_verify_callback) (int ok, X509_STORE_CTX *ctx);
18182   
18183   
18184       GEN_SESSION_CB generate_session_id;
18185   
18186       X509_VERIFY_PARAM *param;
18187   
18188       int quiet_shutdown;
18189   
18190   
18191       CTLOG_STORE *ctlog_store;
18192   
18193   
18194   
18195   
18196       ssl_ct_validation_cb ct_validation_callback;
18197       void *ct_validation_callback_arg;
18198   
18199   
18200   
18201   
18202   
18203   
18204       size_t split_send_fragment;
18205   
18206   
18207   
18208   
18209       size_t max_send_fragment;
18210   
18211   
18212       size_t max_pipelines;
18213   
18214   
18215       size_t default_read_buf_len;
18216   
18217   
18218   
18219   
18220   
18221       ENGINE *client_cert_engine;
18222   
18223   
18224   
18225       SSL_client_hello_cb_fn client_hello_cb;
18226       void *client_hello_cb_arg;
18227   
18228   
18229       struct {
18230   
18231           int (*servername_cb) (SSL *, int *, void *);
18232           void *servername_arg;
18233   
18234           unsigned char tick_key_name[16];
18235           SSL_CTX_EXT_SECURE *secure;
18236   
18237   
18238           int (*ticket_key_cb) (SSL *ssl,
18239                                 unsigned char *name, unsigned char *iv,
18240                                 EVP_CIPHER_CTX *ectx, HMAC_CTX *hctx, int enc);
18241   
18242           int (*ticket_key_evp_cb) (SSL *ssl,
18243                                     unsigned char *name, unsigned char *iv,
18244                                     EVP_CIPHER_CTX *ectx, EVP_MAC_CTX *hctx,
18245                                     int enc);
18246   
18247   
18248   
18249           int (*status_cb) (SSL *ssl, void *arg);
18250           void *status_arg;
18251   
18252           int status_type;
18253   
18254           uint8_t max_fragment_len_mode;
18255   
18256   
18257           size_t ecpointformats_len;
18258           unsigned char *ecpointformats;
18259   
18260           size_t supportedgroups_len;
18261           uint16_t *supportedgroups;
18262   
18263           uint16_t *supported_groups_default;
18264           size_t supported_groups_default_len;
18265   # 1053 "ssl/ssl_local.h"
18266           int (*alpn_select_cb) (SSL *s,
18267                                  const unsigned char **out,
18268                                  unsigned char *outlen,
18269                                  const unsigned char *in,
18270                                  unsigned int inlen, void *arg);
18271           void *alpn_select_cb_arg;
18272   
18273   
18274   
18275   
18276   
18277           unsigned char *alpn;
18278           size_t alpn_len;
18279   # 1074 "ssl/ssl_local.h"
18280           SSL_CTX_npn_advertised_cb_func npn_advertised_cb;
18281           void *npn_advertised_cb_arg;
18282   
18283   
18284   
18285   
18286           SSL_CTX_npn_select_cb_func npn_select_cb;
18287           void *npn_select_cb_arg;
18288   
18289   
18290           unsigned char cookie_hmac_key[32];
18291       } ext;
18292   
18293   
18294       SSL_psk_client_cb_func psk_client_callback;
18295       SSL_psk_server_cb_func psk_server_callback;
18296   
18297       SSL_psk_find_session_cb_func psk_find_session_cb;
18298       SSL_psk_use_session_cb_func psk_use_session_cb;
18299   
18300   
18301       SRP_CTX srp_ctx;
18302   
18303   
18304   
18305       struct dane_ctx_st dane;
18306   
18307   
18308   
18309       struct stack_st_SRTP_PROTECTION_PROFILE *srtp_profiles;
18310   
18311   
18312   
18313   
18314   
18315       int (*not_resumable_session_cb) (SSL *ssl, int is_forward_secure);
18316   
18317       CRYPTO_RWLOCK *lock;
18318   
18319   
18320   
18321   
18322   
18323       SSL_CTX_keylog_cb_func keylog_callback;
18324   
18325   
18326   
18327   
18328   
18329       uint32_t max_early_data;
18330   
18331   
18332   
18333   
18334   
18335       uint32_t recv_max_early_data;
18336   
18337   
18338       size_t (*record_padding_cb)(SSL *s, int type, size_t len, void *arg);
18339       void *record_padding_arg;
18340       size_t block_padding;
18341   
18342   
18343       SSL_CTX_generate_session_ticket_fn generate_ticket_cb;
18344       SSL_CTX_decrypt_session_ticket_fn decrypt_ticket_cb;
18345       void *ticket_cb_data;
18346   
18347   
18348       size_t num_tickets;
18349   
18350   
18351       SSL_allow_early_data_cb_fn allow_early_data_cb;
18352       void *allow_early_data_cb_data;
18353   
18354   
18355       int pha_enabled;
18356   
18357   
18358       SSL_async_callback_fn async_cb;
18359       void *async_cb_arg;
18360   
18361       char *propq;
18362   
18363       int ssl_mac_pkey_id[14];
18364       const EVP_CIPHER *ssl_cipher_methods[24];
18365       const EVP_MD *ssl_digest_methods[14];
18366       size_t ssl_mac_secret_size[14];
18367   
18368       size_t tls12_sigalgs_len;
18369   
18370       struct sigalg_lookup_st *sigalg_lookup_cache;
18371   
18372       uint16_t *tls12_sigalgs;
18373   
18374       TLS_GROUP_INFO *group_list;
18375       size_t group_list_len;
18376       size_t group_list_max_len;
18377   
18378       TLS_SIGALG_INFO *sigalg_list;
18379       size_t sigalg_list_len;
18380       size_t sigalg_list_max_len;
18381   
18382   
18383       uint32_t disabled_enc_mask;
18384       uint32_t disabled_mac_mask;
18385       uint32_t disabled_mkey_mask;
18386       uint32_t disabled_auth_mask;
18387   
18388   
18389   
18390   
18391   
18392   
18393   
18394       unsigned char *client_cert_type;
18395       size_t client_cert_type_len;
18396       unsigned char *server_cert_type;
18397       size_t server_cert_type_len;
18398   
18399   
18400       char *qlog_title;
18401   
18402   };
18403   
18404   typedef struct cert_pkey_st CERT_PKEY;
18405   
18406   
18407   
18408   
18409   
18410   struct ssl_st {
18411       int type;
18412       SSL_CTX *ctx;
18413       const SSL_METHOD *defltmeth;
18414       const SSL_METHOD *method;
18415       CRYPTO_REF_COUNT references;
18416       CRYPTO_RWLOCK *lock;
18417   
18418       CRYPTO_EX_DATA ex_data;
18419   };
18420   
18421   struct ssl_connection_st {
18422   
18423       struct ssl_st ssl;
18424   
18425   
18426   
18427   
18428       int version;
18429   
18430   
18431   
18432   
18433   
18434       BIO *rbio;
18435   
18436       BIO *wbio;
18437   
18438       BIO *bbio;
18439   
18440   
18441   
18442   
18443   
18444       int rwstate;
18445       int (*handshake_func) (SSL *);
18446   # 1248 "ssl/ssl_local.h"
18447       int server;
18448   
18449   
18450   
18451   
18452   
18453   
18454       int new_session;
18455   
18456       int quiet_shutdown;
18457   
18458       int shutdown;
18459   
18460       OSSL_TIME ts_msg_write;
18461       OSSL_TIME ts_msg_read;
18462   
18463       OSSL_STATEM statem;
18464       SSL_EARLY_DATA_STATE early_data_state;
18465       BUF_MEM *init_buf;
18466       void *init_msg;
18467   
18468       size_t init_num;
18469       size_t init_off;
18470   
18471       size_t ssl_pkey_num;
18472   
18473       struct {
18474           long flags;
18475           unsigned char server_random[32];
18476           unsigned char client_random[32];
18477   
18478   
18479           BIO *handshake_buffer;
18480   
18481   
18482   
18483   
18484           EVP_MD_CTX *handshake_dgst;
18485   
18486   
18487   
18488   
18489   
18490           int change_cipher_spec;
18491           int warn_alert;
18492           int fatal_alert;
18493   
18494   
18495   
18496   
18497           int alert_dispatch;
18498           unsigned char send_alert[2];
18499   
18500   
18501   
18502   
18503           int renegotiate;
18504           int total_renegotiations;
18505           int num_renegotiations;
18506           int in_read_app_data;
18507   
18508           struct {
18509   
18510               unsigned char finish_md[64 * 2];
18511               size_t finish_md_len;
18512               unsigned char peer_finish_md[64 * 2];
18513               size_t peer_finish_md_len;
18514               size_t message_size;
18515               int message_type;
18516   
18517               const SSL_CIPHER *new_cipher;
18518               EVP_PKEY *pkey;
18519   
18520               int cert_req;
18521   
18522               uint8_t *ctype;
18523               size_t ctype_len;
18524   
18525               struct stack_st_X509_NAME *peer_ca_names;
18526               size_t key_block_length;
18527               unsigned char *key_block;
18528               const EVP_CIPHER *new_sym_enc;
18529               const EVP_MD *new_hash;
18530               int new_mac_pkey_type;
18531               size_t new_mac_secret_size;
18532   
18533               const SSL_COMP *new_compression;
18534   
18535   
18536   
18537               int cert_request;
18538   
18539               unsigned char *ciphers_raw;
18540               size_t ciphers_rawlen;
18541   
18542               unsigned char *pms;
18543               size_t pmslen;
18544   
18545   
18546               unsigned char *psk;
18547               size_t psklen;
18548   
18549   
18550               const struct sigalg_lookup_st *sigalg;
18551   
18552               CERT_PKEY *cert;
18553   
18554   
18555   
18556   
18557   
18558   
18559               uint16_t *peer_sigalgs;
18560               uint16_t *peer_cert_sigalgs;
18561   
18562               size_t peer_sigalgslen;
18563               size_t peer_cert_sigalgslen;
18564   
18565               const struct sigalg_lookup_st *peer_sigalg;
18566   
18567   
18568   
18569   
18570   
18571               uint32_t *valid_flags;
18572   
18573   
18574   
18575   
18576   
18577               uint32_t mask_k;
18578               uint32_t mask_a;
18579   
18580   
18581   
18582   
18583   
18584               int min_ver;
18585               int max_ver;
18586           } tmp;
18587   
18588   
18589           unsigned char previous_client_finished[64];
18590           size_t previous_client_finished_len;
18591           unsigned char previous_server_finished[64];
18592           size_t previous_server_finished_len;
18593           int send_connection_binding;
18594   
18595   
18596   
18597   
18598   
18599           int npn_seen;
18600   # 1413 "ssl/ssl_local.h"
18601           unsigned char *alpn_selected;
18602           size_t alpn_selected_len;
18603   
18604           unsigned char *alpn_proposed;
18605           size_t alpn_proposed_len;
18606   
18607           int alpn_sent;
18608   
18609   
18610   
18611   
18612   
18613   
18614           char is_probably_safari;
18615   
18616   
18617   
18618   
18619   
18620   
18621           char did_kex;
18622   
18623   
18624           uint16_t group_id;
18625           EVP_PKEY *peer_tmp;
18626   
18627       } s3;
18628   
18629       struct dtls1_state_st *d1;
18630   
18631       void (*msg_callback) (int write_p, int version, int content_type,
18632                             const void *buf, size_t len, SSL *ssl, void *arg);
18633       void *msg_callback_arg;
18634       int hit;
18635       X509_VERIFY_PARAM *param;
18636   
18637       SSL_DANE dane;
18638   
18639       struct stack_st_SSL_CIPHER *peer_ciphers;
18640       struct stack_st_SSL_CIPHER *cipher_list;
18641       struct stack_st_SSL_CIPHER *cipher_list_by_id;
18642   
18643       struct stack_st_SSL_CIPHER *tls13_ciphersuites;
18644   
18645   
18646   
18647   
18648       uint32_t mac_flags;
18649   
18650   
18651   
18652       unsigned char early_secret[64];
18653       unsigned char handshake_secret[64];
18654       unsigned char master_secret[64];
18655       unsigned char resumption_master_secret[64];
18656       unsigned char client_finished_secret[64];
18657       unsigned char server_finished_secret[64];
18658       unsigned char server_finished_hash[64];
18659       unsigned char handshake_traffic_hash[64];
18660       unsigned char client_app_traffic_secret[64];
18661       unsigned char server_app_traffic_secret[64];
18662       unsigned char exporter_master_secret[64];
18663       unsigned char early_exporter_master_secret[64];
18664   
18665   
18666   
18667   
18668       struct cert_st *cert;
18669   
18670   
18671   
18672   
18673   
18674       unsigned char cert_verify_hash[64];
18675       size_t cert_verify_hash_len;
18676   
18677   
18678       enum {SSL_HRR_NONE = 0, SSL_HRR_PENDING, SSL_HRR_COMPLETE}
18679           hello_retry_request;
18680   
18681   
18682   
18683   
18684   
18685       size_t sid_ctx_length;
18686       unsigned char sid_ctx[32];
18687   
18688       SSL_SESSION *session;
18689   
18690       SSL_SESSION *psksession;
18691       unsigned char *psksession_id;
18692       size_t psksession_id_len;
18693   
18694       GEN_SESSION_CB generate_session_id;
18695   
18696   
18697   
18698   
18699       unsigned char tmp_session_id[32];
18700       size_t tmp_session_id_len;
18701   
18702   
18703   
18704   
18705   
18706       uint32_t verify_mode;
18707   
18708       int (*verify_callback) (int ok, X509_STORE_CTX *ctx);
18709   
18710       void (*info_callback) (const SSL *ssl, int type, int val);
18711   
18712       int error;
18713   
18714       int error_code;
18715   
18716       SSL_psk_client_cb_func psk_client_callback;
18717       SSL_psk_server_cb_func psk_server_callback;
18718   
18719       SSL_psk_find_session_cb_func psk_find_session_cb;
18720       SSL_psk_use_session_cb_func psk_use_session_cb;
18721   
18722   
18723       struct stack_st_X509 *verified_chain;
18724       long verify_result;
18725   
18726   
18727   
18728   
18729   
18730   
18731       struct stack_st_X509_NAME *ca_names;
18732       struct stack_st_X509_NAME *client_ca_names;
18733   
18734       uint64_t options;
18735   
18736       uint32_t mode;
18737       int min_proto_version;
18738       int max_proto_version;
18739       size_t max_cert_list;
18740       int first_packet;
18741   
18742   
18743   
18744   
18745       int client_version;
18746   
18747   
18748   
18749   
18750       size_t split_send_fragment;
18751   
18752   
18753   
18754   
18755       size_t max_send_fragment;
18756   
18757       size_t max_pipelines;
18758   
18759       struct {
18760   
18761           uint8_t extflags[TLSEXT_IDX_num_builtins];
18762   
18763           void (*debug_cb)(SSL *s, int client_server, int type,
18764                            const unsigned char *data, int len, void *arg);
18765           void *debug_arg;
18766           char *hostname;
18767   
18768   
18769           int status_type;
18770   
18771           unsigned char *scts;
18772   
18773           uint16_t scts_len;
18774   
18775           int status_expected;
18776   
18777           struct {
18778   
18779               struct stack_st_OCSP_RESPID *ids;
18780               X509_EXTENSIONS *exts;
18781   
18782               unsigned char *resp;
18783               size_t resp_len;
18784           } ocsp;
18785   
18786   
18787           int ticket_expected;
18788   
18789           int extra_tickets_expected;
18790           size_t ecpointformats_len;
18791   
18792           unsigned char *ecpointformats;
18793   
18794           size_t peer_ecpointformats_len;
18795   
18796           unsigned char *peer_ecpointformats;
18797           size_t supportedgroups_len;
18798   
18799           uint16_t *supportedgroups;
18800   
18801           size_t peer_supportedgroups_len;
18802   
18803           uint16_t *peer_supportedgroups;
18804   
18805   
18806           TLS_SESSION_TICKET_EXT *session_ticket;
18807   
18808           tls_session_ticket_ext_cb_fn session_ticket_cb;
18809           void *session_ticket_cb_arg;
18810   
18811           tls_session_secret_cb_fn session_secret_cb;
18812           void *session_secret_cb_arg;
18813   
18814   
18815   
18816   
18817           unsigned char *alpn;
18818           size_t alpn_len;
18819   
18820   
18821   
18822   
18823   
18824   
18825   
18826           unsigned char *npn;
18827           size_t npn_len;
18828   
18829   
18830           int psk_kex_mode;
18831   
18832   
18833           int use_etm;
18834   
18835   
18836           int early_data;
18837   
18838           int early_data_ok;
18839   
18840   
18841           unsigned char *tls13_cookie;
18842           size_t tls13_cookie_len;
18843   
18844           int cookieok;
18845   # 1667 "ssl/ssl_local.h"
18846           uint8_t max_fragment_len_mode;
18847   
18848   
18849   
18850   
18851   
18852   
18853           int tick_identity;
18854   
18855   
18856           int compress_certificate_from_peer[4];
18857   
18858           int compress_certificate_sent;
18859   
18860           uint8_t client_cert_type;
18861           uint8_t client_cert_type_ctos;
18862           uint8_t server_cert_type;
18863           uint8_t server_cert_type_ctos;
18864       } ext;
18865   
18866   
18867   
18868   
18869   
18870       CLIENTHELLO_MSG *clienthello;
18871   
18872   
18873   
18874   
18875   
18876   
18877   
18878       int servername_done;
18879   
18880   
18881   
18882   
18883   
18884       ssl_ct_validation_cb ct_validation_callback;
18885   
18886       void *ct_validation_callback_arg;
18887   
18888   
18889   
18890   
18891       struct stack_st_SCT *scts;
18892   
18893       int scts_parsed;
18894   
18895       SSL_CTX *session_ctx;
18896   
18897   
18898       struct stack_st_SRTP_PROTECTION_PROFILE *srtp_profiles;
18899   
18900       SRTP_PROTECTION_PROFILE *srtp_profile;
18901   
18902   
18903   
18904   
18905   
18906   
18907       int renegotiate;
18908   
18909       int key_update;
18910   
18911       SSL_PHA_STATE post_handshake_auth;
18912       int pha_enabled;
18913       uint8_t* pha_context;
18914       size_t pha_context_len;
18915       int certreqs_sent;
18916       EVP_MD_CTX *pha_dgst;
18917   
18918   
18919   
18920       SRP_CTX srp_ctx;
18921   
18922   
18923   
18924   
18925   
18926       int (*not_resumable_session_cb) (SSL *ssl, int is_forward_secure);
18927   
18928   
18929       RECORD_LAYER rlayer;
18930   
18931   
18932       pem_password_cb *default_passwd_callback;
18933   
18934       void *default_passwd_callback_userdata;
18935   
18936       ASYNC_JOB *job;
18937       ASYNC_WAIT_CTX *waitctx;
18938       size_t asyncrw;
18939   
18940   
18941   
18942   
18943   
18944       uint32_t max_early_data;
18945   
18946   
18947   
18948   
18949       uint32_t recv_max_early_data;
18950   
18951   
18952   
18953   
18954   
18955   
18956       uint32_t early_data_count;
18957   
18958   
18959       size_t num_tickets;
18960   
18961       size_t sent_tickets;
18962   
18963       uint64_t next_ticket_nonce;
18964   
18965   
18966       SSL_allow_early_data_cb_fn allow_early_data_cb;
18967       void *allow_early_data_cb_data;
18968   
18969   
18970       SSL_async_callback_fn async_cb;
18971       void *async_cb_arg;
18972   
18973   
18974   
18975   
18976   
18977       const struct sigalg_lookup_st **shared_sigalgs;
18978       size_t shared_sigalgslen;
18979   
18980   
18981   
18982   
18983   
18984   
18985   
18986       unsigned char *client_cert_type;
18987       size_t client_cert_type_len;
18988       unsigned char *server_cert_type;
18989       size_t server_cert_type_len;
18990   };
18991   # 1826 "ssl/ssl_local.h"
18992   # 1 "ssl/quic/quic_local.h" 1
18993   # 14 "ssl/quic/quic_local.h"
18994   # 1 "include/internal/quic_ssl.h" 1
18995   # 15 "include/internal/quic_ssl.h"
18996   # 1 "include/internal/quic_record_rx.h" 1
18997   # 14 "include/internal/quic_record_rx.h"
18998   # 1 "include/internal/quic_wire_pkt.h" 1
18999   # 14 "include/internal/quic_wire_pkt.h"
19000   # 1 "include/internal/packet_quic.h" 1
19001   # 12 "include/internal/packet_quic.h"
19002           
19003   
19004   
19005   # 1 "include/internal/quic_vlint.h" 1
19006   # 12 "include/internal/quic_vlint.h"
19007           
19008   # 39 "include/internal/quic_vlint.h"
19009   static __attribute__((unused)) inline size_t ossl_quic_vlint_encode_len(uint64_t v)
19010   {
19011       if (v < 64)
19012           return 1;
19013   
19014       if (v < 16384)
19015           return 2;
19016   
19017       if (v < 1073741824)
19018           return 4;
19019   
19020       if (v <= (((uint64_t)1 << 62) - 1))
19021           return 8;
19022   
19023       return 0;
19024   }
19025   # 68 "include/internal/quic_vlint.h"
19026   void ossl_quic_vlint_encode(unsigned char *buf, uint64_t v);
19027   # 90 "include/internal/quic_vlint.h"
19028   void ossl_quic_vlint_encode_n(unsigned char *buf, uint64_t v, int n);
19029   
19030   
19031   
19032   
19033   
19034   
19035   static __attribute__((unused)) inline size_t ossl_quic_vlint_decode_len(uint8_t first_byte)
19036   {
19037       return 1U << ((first_byte & 0xC0) >> 6);
19038   }
19039   # 111 "include/internal/quic_vlint.h"
19040   uint64_t ossl_quic_vlint_decode_unchecked(const unsigned char *buf);
19041   # 123 "include/internal/quic_vlint.h"
19042   int ossl_quic_vlint_decode(const unsigned char *buf, size_t buf_len, uint64_t *v);
19043   # 16 "include/internal/packet_quic.h" 2
19044   
19045   
19046   
19047   
19048   
19049   
19050    static inline int PACKET_get_quic_vlint(PACKET *pkt,
19051                                                       uint64_t *data)
19052   {
19053       size_t enclen;
19054   
19055       if (PACKET_remaining(pkt) < 1)
19056           return 0;
19057   
19058       enclen = ossl_quic_vlint_decode_len(*pkt->curr);
19059   
19060       if (PACKET_remaining(pkt) < enclen)
19061           return 0;
19062   
19063       *data = ossl_quic_vlint_decode_unchecked(pkt->curr);
19064       packet_forward(pkt, enclen);
19065       return 1;
19066   }
19067   
19068   
19069   
19070   
19071   
19072   
19073   
19074    static inline int PACKET_peek_quic_vlint_ex(PACKET *pkt,
19075                                                           uint64_t *data,
19076                                                           int *was_minimal)
19077   {
19078       size_t enclen;
19079   
19080       if (PACKET_remaining(pkt) < 1)
19081           return 0;
19082   
19083       enclen = ossl_quic_vlint_decode_len(*pkt->curr);
19084   
19085       if (PACKET_remaining(pkt) < enclen)
19086           return 0;
19087   
19088       *data = ossl_quic_vlint_decode_unchecked(pkt->curr);
19089   
19090       if (was_minimal != 
19091   # 62 "include/internal/packet_quic.h" 3 4
19092                         ((void *)0)
19093   # 62 "include/internal/packet_quic.h"
19094                             )
19095           *was_minimal = (enclen == ossl_quic_vlint_encode_len(*data));
19096   
19097       return 1;
19098   }
19099   
19100    static inline int PACKET_peek_quic_vlint(PACKET *pkt,
19101                                                        uint64_t *data)
19102   {
19103       return PACKET_peek_quic_vlint_ex(pkt, data, 
19104   # 71 "include/internal/packet_quic.h" 3 4
19105                                                  ((void *)0)
19106   # 71 "include/internal/packet_quic.h"
19107                                                      );
19108   }
19109   
19110   
19111   
19112   
19113    static inline int PACKET_skip_quic_vlint(PACKET *pkt)
19114   {
19115       size_t enclen;
19116   
19117       if (PACKET_remaining(pkt) < 1)
19118           return 0;
19119   
19120       enclen = ossl_quic_vlint_decode_len(*pkt->curr);
19121   
19122       if (PACKET_remaining(pkt) < enclen)
19123           return 0;
19124   
19125       packet_forward(pkt, enclen);
19126       return 1;
19127   }
19128   # 100 "include/internal/packet_quic.h"
19129    static inline int PACKET_get_quic_length_prefixed(PACKET *pkt,
19130                                                                 PACKET *subpkt)
19131   {
19132       uint64_t length;
19133       const unsigned char *data;
19134       PACKET tmp = *pkt;
19135   
19136       if (!PACKET_get_quic_vlint(&tmp, &length) ||
19137           length > 
19138   # 108 "include/internal/packet_quic.h" 3 4
19139                   (18446744073709551615UL) 
19140   # 108 "include/internal/packet_quic.h"
19141                            ||
19142           !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
19143           return 0;
19144       }
19145   
19146       *pkt = tmp;
19147       subpkt->curr = data;
19148       subpkt->remaining = (size_t)length;
19149   
19150       return 1;
19151   }
19152   
19153   
19154   
19155   
19156   
19157    int WPACKET_start_quic_sub_packet(WPACKET *pkt);
19158   # 133 "include/internal/packet_quic.h"
19159    int WPACKET_start_quic_sub_packet_bound(WPACKET *pkt, size_t max_len);
19160   
19161   
19162   
19163   
19164   
19165   
19166   
19167    int WPACKET_quic_sub_allocate_bytes(WPACKET *pkt, size_t len,
19168                                              unsigned char **bytes);
19169   
19170   
19171   
19172   
19173    int WPACKET_quic_write_vlint(WPACKET *pkt, uint64_t v);
19174   # 15 "include/internal/quic_wire_pkt.h" 2
19175   # 1 "include/internal/quic_types.h" 1
19176   # 15 "include/internal/quic_types.h"
19177   # 1 "/usr/include/assert.h" 1 3 4
19178   # 16 "include/internal/quic_types.h" 2
19179   
19180   
19181   
19182   
19183   
19184   enum {
19185       QUIC_ENC_LEVEL_INITIAL = 0,
19186       QUIC_ENC_LEVEL_HANDSHAKE,
19187       QUIC_ENC_LEVEL_0RTT,
19188       QUIC_ENC_LEVEL_1RTT,
19189       QUIC_ENC_LEVEL_NUM
19190   };
19191   
19192   
19193   enum {
19194       QUIC_PN_SPACE_INITIAL = 0,
19195       QUIC_PN_SPACE_HANDSHAKE,
19196   
19197       QUIC_PN_SPACE_APP,
19198       QUIC_PN_SPACE_NUM
19199   };
19200   
19201   static __attribute__((unused)) inline uint32_t
19202   ossl_quic_enc_level_to_pn_space(uint32_t enc_level)
19203   {
19204       switch (enc_level) {
19205       case QUIC_ENC_LEVEL_INITIAL:
19206           return QUIC_PN_SPACE_INITIAL;
19207       case QUIC_ENC_LEVEL_HANDSHAKE:
19208           return QUIC_PN_SPACE_HANDSHAKE;
19209       case QUIC_ENC_LEVEL_0RTT:
19210       case QUIC_ENC_LEVEL_1RTT:
19211           return QUIC_PN_SPACE_APP;
19212       default:
19213           
19214   # 50 "include/internal/quic_types.h" 3 4
19215          ((void) (0))
19216   # 50 "include/internal/quic_types.h"
19217                   ;
19218           return QUIC_PN_SPACE_APP;
19219       }
19220   }
19221   
19222   
19223   typedef uint64_t QUIC_PN;
19224   
19225   
19226   static __attribute__((unused)) inline QUIC_PN ossl_quic_pn_max(QUIC_PN a, QUIC_PN b)
19227   {
19228       return a > b ? a : b;
19229   }
19230   
19231   static __attribute__((unused)) inline QUIC_PN ossl_quic_pn_min(QUIC_PN a, QUIC_PN b)
19232   {
19233       return a < b ? a : b;
19234   }
19235   
19236   static __attribute__((unused)) inline int ossl_quic_pn_valid(QUIC_PN pn)
19237   {
19238       return pn < (((QUIC_PN)1) << 62);
19239   }
19240   
19241   
19242   
19243   
19244   
19245   typedef struct quic_conn_id_st {
19246       unsigned char id_len, id[20];
19247   } QUIC_CONN_ID;
19248   
19249   static __attribute__((unused)) inline int ossl_quic_conn_id_eq(const QUIC_CONN_ID *a,
19250                                                           const QUIC_CONN_ID *b)
19251   {
19252       if (a->id_len != b->id_len || a->id_len > 20)
19253           return 0;
19254       return memcmp(a->id, b->id, a->id_len) == 0;
19255   }
19256   
19257   
19258   
19259   
19260   
19261   int ossl_quic_gen_rand_conn_id(OSSL_LIB_CTX *libctx, size_t len,
19262                                  QUIC_CONN_ID *cid);
19263   # 111 "include/internal/quic_types.h"
19264   typedef struct {
19265       unsigned char token[16];
19266   } QUIC_STATELESS_RESET_TOKEN;
19267   # 16 "include/internal/quic_wire_pkt.h" 2
19268   # 34 "include/internal/quic_wire_pkt.h"
19269   static inline __attribute__((unused)) uint32_t
19270   ossl_quic_pkt_type_to_enc_level(uint32_t pkt_type)
19271   {
19272       switch (pkt_type) {
19273           case 1:
19274               return QUIC_ENC_LEVEL_INITIAL;
19275           case 3:
19276               return QUIC_ENC_LEVEL_HANDSHAKE;
19277           case 2:
19278               return QUIC_ENC_LEVEL_0RTT;
19279           case 5:
19280               return QUIC_ENC_LEVEL_1RTT;
19281           default:
19282               return QUIC_ENC_LEVEL_NUM;
19283       }
19284   }
19285   
19286   static inline __attribute__((unused)) uint32_t
19287   ossl_quic_enc_level_to_pkt_type(uint32_t enc_level)
19288   {
19289       switch (enc_level) {
19290           case QUIC_ENC_LEVEL_INITIAL:
19291               return 1;
19292           case QUIC_ENC_LEVEL_HANDSHAKE:
19293               return 3;
19294           case QUIC_ENC_LEVEL_0RTT:
19295               return 2;
19296           case QUIC_ENC_LEVEL_1RTT:
19297               return 5;
19298           default:
19299               return 
19300   # 64 "include/internal/quic_wire_pkt.h" 3 4
19301                     (4294967295U)
19302   # 64 "include/internal/quic_wire_pkt.h"
19303                               ;
19304       }
19305   }
19306   
19307   
19308   static inline __attribute__((unused)) int
19309   ossl_quic_pkt_type_is_encrypted(uint32_t pkt_type)
19310   {
19311       switch (pkt_type) {
19312           case 4:
19313           case 6:
19314               return 0;
19315           default:
19316               return 1;
19317       }
19318   }
19319   
19320   
19321   static inline __attribute__((unused)) int
19322   ossl_quic_pkt_type_has_pn(uint32_t pkt_type)
19323   {
19324   
19325   
19326   
19327   
19328       return ossl_quic_pkt_type_is_encrypted(pkt_type);
19329   }
19330   
19331   
19332   
19333   
19334   
19335   static inline __attribute__((unused)) int
19336   ossl_quic_pkt_type_can_share_dgram(uint32_t pkt_type)
19337   {
19338   
19339   
19340   
19341   
19342       return ossl_quic_pkt_type_is_encrypted(pkt_type);
19343   }
19344   
19345   
19346   
19347   
19348   
19349   static inline __attribute__((unused)) int
19350   ossl_quic_pkt_type_must_be_last(uint32_t pkt_type)
19351   {
19352   
19353   
19354   
19355   
19356       return !ossl_quic_pkt_type_can_share_dgram(pkt_type)
19357           || pkt_type == 5;
19358   }
19359   
19360   
19361   
19362   
19363   static inline __attribute__((unused)) int
19364   ossl_quic_pkt_type_has_version(uint32_t pkt_type)
19365   {
19366       return pkt_type != 5 && pkt_type != 6;
19367   }
19368   
19369   
19370   
19371   
19372   static inline __attribute__((unused)) int
19373   ossl_quic_pkt_type_has_scid(uint32_t pkt_type)
19374   {
19375       return pkt_type != 5;
19376   }
19377   # 147 "include/internal/quic_wire_pkt.h"
19378   typedef struct quic_pkt_hdr_ptrs_st QUIC_PKT_HDR_PTRS;
19379   # 157 "include/internal/quic_wire_pkt.h"
19380   typedef struct quic_hdr_protector_st {
19381       OSSL_LIB_CTX *libctx;
19382       const char *propq;
19383       EVP_CIPHER_CTX *cipher_ctx;
19384       EVP_CIPHER *cipher;
19385       uint32_t cipher_id;
19386   } QUIC_HDR_PROTECTOR;
19387   # 188 "include/internal/quic_wire_pkt.h"
19388   int ossl_quic_hdr_protector_init(QUIC_HDR_PROTECTOR *hpr,
19389                                    OSSL_LIB_CTX *libctx,
19390                                    const char *propq,
19391                                    uint32_t cipher_id,
19392                                    const unsigned char *quic_hp_key,
19393                                    size_t quic_hp_key_len);
19394   
19395   
19396   
19397   
19398   
19399   
19400   void ossl_quic_hdr_protector_cleanup(QUIC_HDR_PROTECTOR *hpr);
19401   # 214 "include/internal/quic_wire_pkt.h"
19402   int ossl_quic_hdr_protector_decrypt(QUIC_HDR_PROTECTOR *hpr,
19403                                       QUIC_PKT_HDR_PTRS *ptrs);
19404   # 227 "include/internal/quic_wire_pkt.h"
19405   int ossl_quic_hdr_protector_encrypt(QUIC_HDR_PROTECTOR *hpr,
19406                                       QUIC_PKT_HDR_PTRS *ptrs);
19407   # 250 "include/internal/quic_wire_pkt.h"
19408   int ossl_quic_hdr_protector_decrypt_fields(QUIC_HDR_PROTECTOR *hpr,
19409                                              const unsigned char *sample,
19410                                              size_t sample_len,
19411                                              unsigned char *first_byte,
19412                                              unsigned char *pn_bytes);
19413   
19414   
19415   
19416   
19417   
19418   int ossl_quic_hdr_protector_encrypt_fields(QUIC_HDR_PROTECTOR *hpr,
19419                                              const unsigned char *sample,
19420                                              size_t sample_len,
19421                                              unsigned char *first_byte,
19422                                              unsigned char *pn_bytes);
19423   # 311 "include/internal/quic_wire_pkt.h"
19424   typedef struct quic_pkt_hdr_st {
19425   
19426       unsigned int type :8;
19427   
19428   
19429       unsigned int spin_bit :1;
19430   
19431   
19432   
19433   
19434   
19435       unsigned int key_phase :1;
19436   
19437   
19438   
19439   
19440   
19441       unsigned int pn_len :4;
19442   
19443   
19444   
19445   
19446   
19447   
19448       unsigned int partial :1;
19449   
19450   
19451   
19452   
19453   
19454   
19455   
19456       unsigned int fixed :1;
19457   
19458   
19459   
19460   
19461   
19462   
19463   
19464       unsigned int unused :4;
19465   
19466   
19467   
19468   
19469   
19470   
19471   
19472       unsigned int reserved :2;
19473   
19474   
19475       uint32_t version;
19476   
19477   
19478       QUIC_CONN_ID dst_conn_id;
19479   
19480   
19481   
19482   
19483   
19484       QUIC_CONN_ID src_conn_id;
19485   # 381 "include/internal/quic_wire_pkt.h"
19486       unsigned char pn[4];
19487   # 390 "include/internal/quic_wire_pkt.h"
19488       const unsigned char *token;
19489       size_t token_len;
19490   # 402 "include/internal/quic_wire_pkt.h"
19491       size_t len;
19492   # 427 "include/internal/quic_wire_pkt.h"
19493       const unsigned char *data;
19494   } QUIC_PKT_HDR;
19495   
19496   
19497   
19498   
19499   
19500   
19501   struct quic_pkt_hdr_ptrs_st {
19502       unsigned char *raw_start;
19503       unsigned char *raw_sample;
19504       size_t raw_sample_len;
19505   
19506   
19507   
19508   
19509   
19510       unsigned char *raw_pn;
19511   };
19512   # 470 "include/internal/quic_wire_pkt.h"
19513   int ossl_quic_wire_decode_pkt_hdr(PACKET *pkt,
19514                                     size_t short_conn_id_len,
19515                                     int partial,
19516                                     int nodata,
19517                                     QUIC_PKT_HDR *hdr,
19518                                     QUIC_PKT_HDR_PTRS *ptrs);
19519   # 512 "include/internal/quic_wire_pkt.h"
19520   int ossl_quic_wire_encode_pkt_hdr(WPACKET *pkt,
19521                                     size_t short_conn_id_len,
19522                                     const QUIC_PKT_HDR *hdr,
19523                                     QUIC_PKT_HDR_PTRS *ptrs);
19524   # 527 "include/internal/quic_wire_pkt.h"
19525   int ossl_quic_wire_get_pkt_hdr_dst_conn_id(const unsigned char *buf,
19526                                              size_t buf_len,
19527                                              size_t short_conn_id_len,
19528                                              QUIC_CONN_ID *dst_conn_id);
19529   # 539 "include/internal/quic_wire_pkt.h"
19530   int ossl_quic_wire_get_encoded_pkt_hdr_len(size_t short_conn_id_len,
19531                                              const QUIC_PKT_HDR *hdr);
19532   # 558 "include/internal/quic_wire_pkt.h"
19533   int ossl_quic_wire_decode_pkt_hdr_pn(const unsigned char *enc_pn,
19534                                        size_t enc_pn_len,
19535                                        QUIC_PN largest_pn,
19536                                        QUIC_PN *res_pn);
19537   
19538   
19539   
19540   
19541   
19542   int ossl_quic_wire_determine_pn_len(QUIC_PN pn, QUIC_PN largest_acked);
19543   # 577 "include/internal/quic_wire_pkt.h"
19544   int ossl_quic_wire_encode_pkt_hdr_pn(QUIC_PN pn,
19545                                        unsigned char *enc_pn,
19546                                        size_t enc_pn_len);
19547   # 600 "include/internal/quic_wire_pkt.h"
19548   int ossl_quic_validate_retry_integrity_tag(OSSL_LIB_CTX *libctx,
19549                                              const char *propq,
19550                                              const QUIC_PKT_HDR *hdr,
19551                                              const QUIC_CONN_ID *client_initial_dcid);
19552   # 621 "include/internal/quic_wire_pkt.h"
19553   int ossl_quic_calculate_retry_integrity_tag(OSSL_LIB_CTX *libctx,
19554                                               const char *propq,
19555                                               const QUIC_PKT_HDR *hdr,
19556                                               const QUIC_CONN_ID *client_initial_dcid,
19557                                               unsigned char *tag);
19558   # 15 "include/internal/quic_record_rx.h" 2
19559   
19560   # 1 "include/internal/quic_predef.h" 1
19561   # 15 "include/internal/quic_predef.h"
19562   typedef struct quic_port_st QUIC_PORT;
19563   typedef struct quic_channel_st QUIC_CHANNEL;
19564   typedef struct quic_tls_st QUIC_TLS;
19565   typedef struct quic_txpim_st QUIC_TXPIM;
19566   typedef struct quic_fifd_st QUIC_FIFD;
19567   typedef struct quic_cfq_st QUIC_CFQ;
19568   typedef struct ossl_quic_tx_packetiser_st OSSL_QUIC_TX_PACKETISER;
19569   typedef struct ossl_ackm_st OSSL_ACKM;
19570   typedef struct quic_srt_elem_st QUIC_SRT_ELEM;
19571   typedef struct ossl_cc_data_st OSSL_CC_DATA;
19572   typedef struct ossl_cc_method_st OSSL_CC_METHOD;
19573   typedef struct quic_stream_map_st QUIC_STREAM_MAP;
19574   typedef struct quic_stream_st QUIC_STREAM;
19575   typedef struct quic_sstream_st QUIC_SSTREAM;
19576   typedef struct quic_rstream_st QUIC_RSTREAM;
19577   typedef struct quic_reactor_st QUIC_REACTOR;
19578   typedef struct ossl_statm_st OSSL_STATM;
19579   typedef struct quic_demux_st QUIC_DEMUX;
19580   typedef struct ossl_qrx_pkt_st OSSL_QRX_PKT;
19581   typedef struct ossl_qtx_pkt_st OSSL_QTX_PKT;
19582   typedef struct quic_tick_result_st QUIC_TICK_RESULT;
19583   typedef struct quic_srtm_st QUIC_SRTM;
19584   typedef struct quic_lcidm_st QUIC_LCIDM;
19585   typedef struct quic_urxe_st QUIC_URXE;
19586   typedef struct quic_engine_st QUIC_ENGINE;
19587   # 17 "include/internal/quic_record_rx.h" 2
19588   # 1 "include/internal/quic_record_util.h" 1
19589   # 18 "include/internal/quic_record_util.h"
19590   struct ossl_qrx_st;
19591   struct ossl_qtx_st;
19592   
19593   
19594   
19595   
19596   
19597   
19598   
19599   int ossl_quic_hkdf_extract(OSSL_LIB_CTX *libctx,
19600                              const char *propq,
19601                              const EVP_MD *md,
19602                              const unsigned char *salt, size_t salt_len,
19603                              const unsigned char *ikm, size_t ikm_len,
19604                              unsigned char *out, size_t out_len);
19605   # 61 "include/internal/quic_record_util.h"
19606   int ossl_quic_provide_initial_secret(OSSL_LIB_CTX *libctx,
19607                                        const char *propq,
19608                                        const QUIC_CONN_ID *dst_conn_id,
19609                                        int is_server,
19610                                        struct ossl_qrx_st *qrx,
19611                                        struct ossl_qtx_st *qtx);
19612   # 79 "include/internal/quic_record_util.h"
19613   const char *ossl_qrl_get_suite_cipher_name(uint32_t suite_id);
19614   
19615   
19616   const char *ossl_qrl_get_suite_md_name(uint32_t suite_id);
19617   
19618   
19619   uint32_t ossl_qrl_get_suite_secret_len(uint32_t suite_id);
19620   
19621   
19622   uint32_t ossl_qrl_get_suite_cipher_key_len(uint32_t suite_id);
19623   
19624   
19625   uint32_t ossl_qrl_get_suite_cipher_iv_len(uint32_t suite_id);
19626   
19627   
19628   uint32_t ossl_qrl_get_suite_cipher_tag_len(uint32_t suite_id);
19629   
19630   
19631   uint32_t ossl_qrl_get_suite_hdr_prot_cipher_id(uint32_t suite_id);
19632   
19633   
19634   uint32_t ossl_qrl_get_suite_hdr_prot_key_len(uint32_t suite_id);
19635   
19636   
19637   
19638   
19639   
19640   uint64_t ossl_qrl_get_suite_max_pkt(uint32_t suite_id);
19641   
19642   
19643   
19644   
19645   
19646   uint64_t ossl_qrl_get_suite_max_forged_pkt(uint32_t suite_id);
19647   # 18 "include/internal/quic_record_rx.h" 2
19648   # 1 "include/internal/quic_demux.h" 1
19649   # 16 "include/internal/quic_demux.h"
19650   # 1 "include/internal/bio_addr.h" 1
19651   # 14 "include/internal/bio_addr.h"
19652   # 1 "include/internal/sockets.h" 1
19653   # 12 "include/internal/sockets.h"
19654           
19655   # 85 "include/internal/sockets.h"
19656   # 1 "/usr/include/x86_64-linux-gnu/sys/param.h" 1 3 4
19657   # 23 "/usr/include/x86_64-linux-gnu/sys/param.h" 3 4
19658   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 1 3 4
19659   # 24 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4
19660   
19661   
19662   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/limits.h" 1 3 4
19663   # 27 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4
19664   
19665   # 1 "/usr/include/signal.h" 1 3 4
19666   # 27 "/usr/include/signal.h" 3 4
19667   
19668   
19669   
19670   # 1 "/usr/include/x86_64-linux-gnu/bits/signum-generic.h" 1 3 4
19671   # 76 "/usr/include/x86_64-linux-gnu/bits/signum-generic.h" 3 4
19672   # 1 "/usr/include/x86_64-linux-gnu/bits/signum-arch.h" 1 3 4
19673   # 77 "/usr/include/x86_64-linux-gnu/bits/signum-generic.h" 2 3 4
19674   # 31 "/usr/include/signal.h" 2 3 4
19675   
19676   # 1 "/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h" 1 3 4
19677   
19678   
19679   
19680   
19681   
19682   
19683   
19684   
19685   # 8 "/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h" 3 4
19686   typedef __sig_atomic_t sig_atomic_t;
19687   # 33 "/usr/include/signal.h" 2 3 4
19688   # 57 "/usr/include/signal.h" 3 4
19689   # 1 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 1 3 4
19690   
19691   
19692   
19693   # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
19694   # 5 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 2 3 4
19695   
19696   # 1 "/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h" 1 3 4
19697   # 24 "/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h" 3 4
19698   union sigval
19699   {
19700     int sival_int;
19701     void *sival_ptr;
19702   };
19703   
19704   typedef union sigval __sigval_t;
19705   # 7 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 2 3 4
19706   # 16 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 3 4
19707   # 1 "/usr/include/x86_64-linux-gnu/bits/siginfo-arch.h" 1 3 4
19708   # 17 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 2 3 4
19709   # 36 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 3 4
19710   typedef struct
19711     {
19712       int si_signo;
19713   
19714       int si_errno;
19715   
19716       int si_code;
19717   
19718   
19719   
19720   
19721   
19722       int __pad0;
19723   
19724   
19725       union
19726         {
19727    int _pad[((128 / sizeof (int)) - 4)];
19728   
19729   
19730    struct
19731      {
19732        __pid_t si_pid;
19733        __uid_t si_uid;
19734      } _kill;
19735   
19736   
19737    struct
19738      {
19739        int si_tid;
19740        int si_overrun;
19741        __sigval_t si_sigval;
19742      } _timer;
19743   
19744   
19745    struct
19746      {
19747        __pid_t si_pid;
19748        __uid_t si_uid;
19749        __sigval_t si_sigval;
19750      } _rt;
19751   
19752   
19753    struct
19754      {
19755        __pid_t si_pid;
19756        __uid_t si_uid;
19757        int si_status;
19758        __clock_t si_utime;
19759        __clock_t si_stime;
19760      } _sigchld;
19761   
19762   
19763    struct
19764      {
19765        void *si_addr;
19766       
19767        short int si_addr_lsb;
19768        union
19769          {
19770   
19771     struct
19772       {
19773         void *_lower;
19774         void *_upper;
19775       } _addr_bnd;
19776   
19777     __uint32_t _pkey;
19778          } _bounds;
19779      } _sigfault;
19780   
19781   
19782    struct
19783      {
19784        long int si_band;
19785        int si_fd;
19786      } _sigpoll;
19787   
19788   
19789   
19790    struct
19791      {
19792        void *_call_addr;
19793        int _syscall;
19794        unsigned int _arch;
19795      } _sigsys;
19796   
19797         } _sifields;
19798     } siginfo_t ;
19799   # 58 "/usr/include/signal.h" 2 3 4
19800   # 1 "/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h" 1 3 4
19801   # 35 "/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h" 3 4
19802   enum
19803   {
19804     SI_ASYNCNL = -60,
19805     SI_DETHREAD = -7,
19806   
19807     SI_TKILL,
19808     SI_SIGIO,
19809   
19810     SI_ASYNCIO,
19811     SI_MESGQ,
19812     SI_TIMER,
19813   
19814   
19815   
19816   
19817   
19818     SI_QUEUE,
19819     SI_USER,
19820     SI_KERNEL = 0x80
19821   # 66 "/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h" 3 4
19822   };
19823   
19824   
19825   
19826   
19827   enum
19828   {
19829     ILL_ILLOPC = 1,
19830   
19831     ILL_ILLOPN,
19832   
19833     ILL_ILLADR,
19834   
19835     ILL_ILLTRP,
19836   
19837     ILL_PRVOPC,
19838   
19839     ILL_PRVREG,
19840   
19841     ILL_COPROC,
19842   
19843     ILL_BADSTK,
19844   
19845     ILL_BADIADDR
19846   
19847   };
19848   
19849   
19850   enum
19851   {
19852     FPE_INTDIV = 1,
19853   
19854     FPE_INTOVF,
19855   
19856     FPE_FLTDIV,
19857   
19858     FPE_FLTOVF,
19859   
19860     FPE_FLTUND,
19861   
19862     FPE_FLTRES,
19863   
19864     FPE_FLTINV,
19865   
19866     FPE_FLTSUB,
19867   
19868     FPE_FLTUNK = 14,
19869   
19870     FPE_CONDTRAP
19871   
19872   };
19873   
19874   
19875   enum
19876   {
19877     SEGV_MAPERR = 1,
19878   
19879     SEGV_ACCERR,
19880   
19881     SEGV_BNDERR,
19882   
19883     SEGV_PKUERR,
19884   
19885     SEGV_ACCADI,
19886   
19887     SEGV_ADIDERR,
19888   
19889     SEGV_ADIPERR,
19890   
19891     SEGV_MTEAERR,
19892   
19893     SEGV_MTESERR
19894   
19895   };
19896   
19897   
19898   enum
19899   {
19900     BUS_ADRALN = 1,
19901   
19902     BUS_ADRERR,
19903   
19904     BUS_OBJERR,
19905   
19906     BUS_MCEERR_AR,
19907   
19908     BUS_MCEERR_AO
19909   
19910   };
19911   # 176 "/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h" 3 4
19912   enum
19913   {
19914     CLD_EXITED = 1,
19915   
19916     CLD_KILLED,
19917   
19918     CLD_DUMPED,
19919   
19920     CLD_TRAPPED,
19921   
19922     CLD_STOPPED,
19923   
19924     CLD_CONTINUED
19925   
19926   };
19927   
19928   
19929   enum
19930   {
19931     POLL_IN = 1,
19932   
19933     POLL_OUT,
19934   
19935     POLL_MSG,
19936   
19937     POLL_ERR,
19938   
19939     POLL_PRI,
19940   
19941     POLL_HUP
19942   
19943   };
19944   # 59 "/usr/include/signal.h" 2 3 4
19945   
19946   
19947   
19948   # 1 "/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h" 1 3 4
19949   # 16 "/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h" 3 4
19950   typedef __sigval_t sigval_t;
19951   # 63 "/usr/include/signal.h" 2 3 4
19952   
19953   
19954   
19955   # 1 "/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h" 1 3 4
19956   
19957   
19958   
19959   # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4
19960   # 5 "/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h" 2 3 4
19961   # 22 "/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h" 3 4
19962   typedef struct sigevent
19963     {
19964       __sigval_t sigev_value;
19965       int sigev_signo;
19966       int sigev_notify;
19967   
19968       union
19969         {
19970    int _pad[((64 / sizeof (int)) - 4)];
19971   
19972   
19973   
19974    __pid_t _tid;
19975   
19976    struct
19977      {
19978        void (*_function) (__sigval_t);
19979        pthread_attr_t *_attribute;
19980      } _sigev_thread;
19981         } _sigev_un;
19982     } sigevent_t;
19983   # 67 "/usr/include/signal.h" 2 3 4
19984   # 1 "/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h" 1 3 4
19985   # 27 "/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h" 3 4
19986   enum
19987   {
19988     SIGEV_SIGNAL = 0,
19989   
19990     SIGEV_NONE,
19991   
19992     SIGEV_THREAD,
19993   
19994   
19995     SIGEV_THREAD_ID = 4
19996   
19997   
19998   };
19999   # 68 "/usr/include/signal.h" 2 3 4
20000   
20001   
20002   
20003   
20004   typedef void (*__sighandler_t) (int);
20005   
20006   
20007   
20008   
20009   extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
20010        __attribute__ ((__nothrow__ , __leaf__));
20011   # 88 "/usr/include/signal.h" 3 4
20012   extern __sighandler_t signal (int __sig, __sighandler_t __handler)
20013        __attribute__ ((__nothrow__ , __leaf__));
20014   # 112 "/usr/include/signal.h" 3 4
20015   extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__ , __leaf__));
20016   
20017   
20018   
20019   
20020   
20021   
20022   extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__ , __leaf__));
20023   
20024   
20025   
20026   extern int raise (int __sig) __attribute__ ((__nothrow__ , __leaf__));
20027   
20028   
20029   
20030   extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
20031        __attribute__ ((__nothrow__ , __leaf__));
20032   extern int gsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__));
20033   
20034   
20035   
20036   
20037   extern void psignal (int __sig, const char *__s);
20038   
20039   
20040   extern void psiginfo (const siginfo_t *__pinfo, const char *__s);
20041   # 173 "/usr/include/signal.h" 3 4
20042   extern int sigblock (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
20043   
20044   
20045   extern int sigsetmask (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
20046   
20047   
20048   extern int siggetmask (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
20049   # 193 "/usr/include/signal.h" 3 4
20050   typedef __sighandler_t sig_t;
20051   
20052   
20053   
20054   
20055   
20056   extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
20057   
20058   
20059   extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
20060   
20061   
20062   extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
20063   
20064   
20065   extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
20066   
20067   
20068   extern int sigismember (const sigset_t *__set, int __signo)
20069        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
20070   # 229 "/usr/include/signal.h" 3 4
20071   # 1 "/usr/include/x86_64-linux-gnu/bits/sigaction.h" 1 3 4
20072   # 27 "/usr/include/x86_64-linux-gnu/bits/sigaction.h" 3 4
20073   struct sigaction
20074     {
20075   
20076   
20077       union
20078         {
20079   
20080    __sighandler_t sa_handler;
20081   
20082    void (*sa_sigaction) (int, siginfo_t *, void *);
20083         }
20084       __sigaction_handler;
20085   
20086   
20087   
20088   
20089   
20090   
20091   
20092       __sigset_t sa_mask;
20093   
20094   
20095       int sa_flags;
20096   
20097   
20098       void (*sa_restorer) (void);
20099     };
20100   # 230 "/usr/include/signal.h" 2 3 4
20101   
20102   
20103   extern int sigprocmask (int __how, const sigset_t *__restrict __set,
20104      sigset_t *__restrict __oset) __attribute__ ((__nothrow__ , __leaf__));
20105   
20106   
20107   
20108   
20109   
20110   
20111   extern int sigsuspend (const sigset_t *__set) __attribute__ ((__nonnull__ (1)));
20112   
20113   
20114   extern int sigaction (int __sig, const struct sigaction *__restrict __act,
20115           struct sigaction *__restrict __oact) __attribute__ ((__nothrow__ , __leaf__));
20116   
20117   
20118   extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
20119   
20120   
20121   
20122   
20123   
20124   
20125   
20126   extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig)
20127        __attribute__ ((__nonnull__ (1, 2)));
20128   
20129   
20130   
20131   
20132   
20133   
20134   
20135   extern int sigwaitinfo (const sigset_t *__restrict __set,
20136      siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1)));
20137   
20138   
20139   
20140   
20141   
20142   
20143   
20144   extern int sigtimedwait (const sigset_t *__restrict __set,
20145       siginfo_t *__restrict __info,
20146       const struct timespec *__restrict __timeout)
20147        __attribute__ ((__nonnull__ (1)));
20148   # 292 "/usr/include/signal.h" 3 4
20149   extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val)
20150        __attribute__ ((__nothrow__ , __leaf__));
20151   
20152   
20153   
20154   
20155   
20156   
20157   
20158   # 1 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 1 3 4
20159   # 31 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 3 4
20160   struct _fpx_sw_bytes
20161   {
20162     __uint32_t magic1;
20163     __uint32_t extended_size;
20164     __uint64_t xstate_bv;
20165     __uint32_t xstate_size;
20166     __uint32_t __glibc_reserved1[7];
20167   };
20168   
20169   struct _fpreg
20170   {
20171     unsigned short significand[4];
20172     unsigned short exponent;
20173   };
20174   
20175   struct _fpxreg
20176   {
20177     unsigned short significand[4];
20178     unsigned short exponent;
20179     unsigned short __glibc_reserved1[3];
20180   };
20181   
20182   struct _xmmreg
20183   {
20184     __uint32_t element[4];
20185   };
20186   # 123 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 3 4
20187   struct _fpstate
20188   {
20189   
20190     __uint16_t cwd;
20191     __uint16_t swd;
20192     __uint16_t ftw;
20193     __uint16_t fop;
20194     __uint64_t rip;
20195     __uint64_t rdp;
20196     __uint32_t mxcsr;
20197     __uint32_t mxcr_mask;
20198     struct _fpxreg _st[8];
20199     struct _xmmreg _xmm[16];
20200     __uint32_t __glibc_reserved1[24];
20201   };
20202   
20203   struct sigcontext
20204   {
20205     __uint64_t r8;
20206     __uint64_t r9;
20207     __uint64_t r10;
20208     __uint64_t r11;
20209     __uint64_t r12;
20210     __uint64_t r13;
20211     __uint64_t r14;
20212     __uint64_t r15;
20213     __uint64_t rdi;
20214     __uint64_t rsi;
20215     __uint64_t rbp;
20216     __uint64_t rbx;
20217     __uint64_t rdx;
20218     __uint64_t rax;
20219     __uint64_t rcx;
20220     __uint64_t rsp;
20221     __uint64_t rip;
20222     __uint64_t eflags;
20223     unsigned short cs;
20224     unsigned short gs;
20225     unsigned short fs;
20226     unsigned short __pad0;
20227     __uint64_t err;
20228     __uint64_t trapno;
20229     __uint64_t oldmask;
20230     __uint64_t cr2;
20231     __extension__ union
20232       {
20233         struct _fpstate * fpstate;
20234         __uint64_t __fpstate_word;
20235       };
20236     __uint64_t __reserved1 [8];
20237   };
20238   
20239   
20240   
20241   struct _xsave_hdr
20242   {
20243     __uint64_t xstate_bv;
20244     __uint64_t __glibc_reserved1[2];
20245     __uint64_t __glibc_reserved2[5];
20246   };
20247   
20248   struct _ymmh_state
20249   {
20250     __uint32_t ymmh_space[64];
20251   };
20252   
20253   struct _xstate
20254   {
20255     struct _fpstate fpstate;
20256     struct _xsave_hdr xstate_hdr;
20257     struct _ymmh_state ymmh;
20258   };
20259   # 302 "/usr/include/signal.h" 2 3 4
20260   
20261   
20262   extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__ , __leaf__));
20263   
20264   
20265   
20266   
20267   
20268   
20269   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 1 3 4
20270   # 312 "/usr/include/signal.h" 2 3 4
20271   
20272   # 1 "/usr/include/x86_64-linux-gnu/bits/types/stack_t.h" 1 3 4
20273   # 23 "/usr/include/x86_64-linux-gnu/bits/types/stack_t.h" 3 4
20274   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 1 3 4
20275   # 24 "/usr/include/x86_64-linux-gnu/bits/types/stack_t.h" 2 3 4
20276   
20277   
20278   typedef struct
20279     {
20280       void *ss_sp;
20281       int ss_flags;
20282       size_t ss_size;
20283     } stack_t;
20284   # 314 "/usr/include/signal.h" 2 3 4
20285   
20286   
20287   # 1 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 1 3 4
20288   # 37 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 3 4
20289   __extension__ typedef long long int greg_t;
20290   # 46 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 3 4
20291   typedef greg_t gregset_t[23];
20292   # 101 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 3 4
20293   struct _libc_fpxreg
20294   {
20295     unsigned short int significand[4];
20296     unsigned short int exponent;
20297     unsigned short int __glibc_reserved1[3];
20298   };
20299   
20300   struct _libc_xmmreg
20301   {
20302     __uint32_t element[4];
20303   };
20304   
20305   struct _libc_fpstate
20306   {
20307   
20308     __uint16_t cwd;
20309     __uint16_t swd;
20310     __uint16_t ftw;
20311     __uint16_t fop;
20312     __uint64_t rip;
20313     __uint64_t rdp;
20314     __uint32_t mxcsr;
20315     __uint32_t mxcr_mask;
20316     struct _libc_fpxreg _st[8];
20317     struct _libc_xmmreg _xmm[16];
20318     __uint32_t __glibc_reserved1[24];
20319   };
20320   
20321   
20322   typedef struct _libc_fpstate *fpregset_t;
20323   
20324   
20325   typedef struct
20326     {
20327       gregset_t gregs;
20328   
20329       fpregset_t fpregs;
20330       __extension__ unsigned long long __reserved1 [8];
20331   } mcontext_t;
20332   
20333   
20334   typedef struct ucontext_t
20335     {
20336       unsigned long int uc_flags;
20337       struct ucontext_t *uc_link;
20338       stack_t uc_stack;
20339       mcontext_t uc_mcontext;
20340       sigset_t uc_sigmask;
20341       struct _libc_fpstate __fpregs_mem;
20342       __extension__ unsigned long long int __ssp[4];
20343     } ucontext_t;
20344   # 317 "/usr/include/signal.h" 2 3 4
20345   
20346   
20347   
20348   
20349   
20350   
20351   
20352   extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ , __leaf__))
20353     __attribute__ ((__deprecated__ ("Use sigaction with SA_RESTART instead")));
20354   
20355   # 1 "/usr/include/x86_64-linux-gnu/bits/sigstack.h" 1 3 4
20356   # 328 "/usr/include/signal.h" 2 3 4
20357   # 1 "/usr/include/x86_64-linux-gnu/bits/sigstksz.h" 1 3 4
20358   # 329 "/usr/include/signal.h" 2 3 4
20359   # 1 "/usr/include/x86_64-linux-gnu/bits/ss_flags.h" 1 3 4
20360   # 27 "/usr/include/x86_64-linux-gnu/bits/ss_flags.h" 3 4
20361   enum
20362   {
20363     SS_ONSTACK = 1,
20364   
20365     SS_DISABLE
20366   
20367   };
20368   # 330 "/usr/include/signal.h" 2 3 4
20369   
20370   
20371   
20372   extern int sigaltstack (const stack_t *__restrict __ss,
20373      stack_t *__restrict __oss) __attribute__ ((__nothrow__ , __leaf__));
20374   
20375   
20376   
20377   
20378   # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h" 1 3 4
20379   # 23 "/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h" 3 4
20380   struct sigstack
20381     {
20382       void *ss_sp;
20383       int ss_onstack;
20384     };
20385   # 340 "/usr/include/signal.h" 2 3 4
20386   
20387   
20388   
20389   
20390   
20391   
20392   
20393   extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
20394        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
20395   # 376 "/usr/include/signal.h" 3 4
20396   # 1 "/usr/include/x86_64-linux-gnu/bits/sigthread.h" 1 3 4
20397   # 31 "/usr/include/x86_64-linux-gnu/bits/sigthread.h" 3 4
20398   extern int pthread_sigmask (int __how,
20399          const __sigset_t *__restrict __newmask,
20400          __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__ , __leaf__));
20401   
20402   
20403   extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__ , __leaf__));
20404   # 377 "/usr/include/signal.h" 2 3 4
20405   
20406   
20407   
20408   
20409   
20410   
20411   extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__ , __leaf__));
20412   
20413   extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__ , __leaf__));
20414   
20415   
20416   
20417   
20418   
20419   # 1 "/usr/include/x86_64-linux-gnu/bits/signal_ext.h" 1 3 4
20420   # 392 "/usr/include/signal.h" 2 3 4
20421   
20422   
20423   # 29 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4
20424   
20425   
20426   # 1 "/usr/include/x86_64-linux-gnu/bits/param.h" 1 3 4
20427   # 28 "/usr/include/x86_64-linux-gnu/bits/param.h" 3 4
20428   # 1 "/usr/include/linux/param.h" 1 3 4
20429   
20430   
20431   
20432   
20433   # 1 "/usr/include/x86_64-linux-gnu/asm/param.h" 1 3 4
20434   # 1 "/usr/include/asm-generic/param.h" 1 3 4
20435   # 2 "/usr/include/x86_64-linux-gnu/asm/param.h" 2 3 4
20436   # 6 "/usr/include/linux/param.h" 2 3 4
20437   # 29 "/usr/include/x86_64-linux-gnu/bits/param.h" 2 3 4
20438   # 32 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4
20439   # 86 "include/internal/sockets.h" 2
20440   
20441   
20442   
20443   
20444   
20445   # 1 "/usr/include/netdb.h" 1 3 4
20446   # 27 "/usr/include/netdb.h" 3 4
20447   # 1 "/usr/include/netinet/in.h" 1 3 4
20448   # 23 "/usr/include/netinet/in.h" 3 4
20449   # 1 "/usr/include/x86_64-linux-gnu/sys/socket.h" 1 3 4
20450   # 24 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
20451   
20452   
20453   # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h" 1 3 4
20454   # 23 "/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h" 3 4
20455   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 1 3 4
20456   # 24 "/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h" 2 3 4
20457   
20458   
20459   struct iovec
20460     {
20461       void *iov_base;
20462       size_t iov_len;
20463     };
20464   # 27 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4
20465   
20466   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 1 3 4
20467   # 29 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4
20468   
20469   
20470   
20471   
20472   # 1 "/usr/include/x86_64-linux-gnu/bits/socket.h" 1 3 4
20473   # 27 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4
20474   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 1 3 4
20475   # 28 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4
20476   # 38 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4
20477   # 1 "/usr/include/x86_64-linux-gnu/bits/socket_type.h" 1 3 4
20478   # 24 "/usr/include/x86_64-linux-gnu/bits/socket_type.h" 3 4
20479   enum __socket_type
20480   {
20481     SOCK_STREAM = 1,
20482   
20483   
20484     SOCK_DGRAM = 2,
20485   
20486   
20487     SOCK_RAW = 3,
20488   
20489     SOCK_RDM = 4,
20490   
20491     SOCK_SEQPACKET = 5,
20492   
20493   
20494     SOCK_DCCP = 6,
20495   
20496     SOCK_PACKET = 10,
20497   
20498   
20499   
20500   
20501   
20502   
20503   
20504     SOCK_CLOEXEC = 02000000,
20505   
20506   
20507     SOCK_NONBLOCK = 00004000
20508   
20509   
20510   };
20511   # 39 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4
20512   # 177 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4
20513   # 1 "/usr/include/x86_64-linux-gnu/bits/sockaddr.h" 1 3 4
20514   # 28 "/usr/include/x86_64-linux-gnu/bits/sockaddr.h" 3 4
20515   typedef unsigned short int sa_family_t;
20516   # 178 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4
20517   
20518   
20519   struct sockaddr
20520     {
20521       sa_family_t sa_family;
20522       char sa_data[14];
20523     };
20524   # 193 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4
20525   struct sockaddr_storage
20526     {
20527       sa_family_t ss_family;
20528       char __ss_padding[(128 - (sizeof (unsigned short int)) - sizeof (unsigned long int))];
20529       unsigned long int __ss_align;
20530     };
20531   
20532   
20533   
20534   enum
20535     {
20536       MSG_OOB = 0x01,
20537   
20538       MSG_PEEK = 0x02,
20539   
20540       MSG_DONTROUTE = 0x04,
20541   
20542   
20543   
20544   
20545   
20546   
20547       MSG_CTRUNC = 0x08,
20548   
20549       MSG_PROXY = 0x10,
20550   
20551       MSG_TRUNC = 0x20,
20552   
20553       MSG_DONTWAIT = 0x40,
20554   
20555       MSG_EOR = 0x80,
20556   
20557       MSG_WAITALL = 0x100,
20558   
20559       MSG_FIN = 0x200,
20560   
20561       MSG_SYN = 0x400,
20562   
20563       MSG_CONFIRM = 0x800,
20564   
20565       MSG_RST = 0x1000,
20566   
20567       MSG_ERRQUEUE = 0x2000,
20568   
20569       MSG_NOSIGNAL = 0x4000,
20570   
20571       MSG_MORE = 0x8000,
20572   
20573       MSG_WAITFORONE = 0x10000,
20574   
20575       MSG_BATCH = 0x40000,
20576   
20577       MSG_ZEROCOPY = 0x4000000,
20578   
20579       MSG_FASTOPEN = 0x20000000,
20580   
20581   
20582       MSG_CMSG_CLOEXEC = 0x40000000
20583   
20584   
20585   
20586     };
20587   
20588   
20589   
20590   
20591   struct msghdr
20592     {
20593       void *msg_name;
20594       socklen_t msg_namelen;
20595   
20596       struct iovec *msg_iov;
20597       size_t msg_iovlen;
20598   
20599       void *msg_control;
20600       size_t msg_controllen;
20601   
20602   
20603   
20604   
20605       int msg_flags;
20606     };
20607   
20608   
20609   struct cmsghdr
20610     {
20611       size_t cmsg_len;
20612   
20613   
20614   
20615   
20616       int cmsg_level;
20617       int cmsg_type;
20618   
20619       __extension__ unsigned char __cmsg_data [];
20620   
20621     };
20622   # 307 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4
20623   extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
20624             struct cmsghdr *__cmsg) __attribute__ ((__nothrow__ , __leaf__));
20625   
20626   
20627   
20628   
20629   extern __inline __attribute__ ((__gnu_inline__)) struct cmsghdr *
20630   __attribute__ ((__nothrow__ , __leaf__)) __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)
20631   {
20632     if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
20633   
20634       return (struct cmsghdr *) 0;
20635   
20636     __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
20637             + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)));
20638     if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
20639        + __mhdr->msg_controllen)
20640         || ((unsigned char *) __cmsg + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1))
20641      > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
20642   
20643       return (struct cmsghdr *) 0;
20644     return __cmsg;
20645   }
20646   
20647   
20648   
20649   
20650   enum
20651     {
20652       SCM_RIGHTS = 0x01
20653   
20654   
20655   
20656   
20657   
20658     };
20659   # 356 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4
20660   # 1 "/usr/include/x86_64-linux-gnu/asm/socket.h" 1 3 4
20661   # 1 "/usr/include/asm-generic/socket.h" 1 3 4
20662   
20663   
20664   
20665   
20666   # 1 "/usr/include/linux/posix_types.h" 1 3 4
20667   
20668   
20669   
20670   
20671   # 1 "/usr/include/linux/stddef.h" 1 3 4
20672   # 6 "/usr/include/linux/posix_types.h" 2 3 4
20673   # 25 "/usr/include/linux/posix_types.h" 3 4
20674   typedef struct {
20675    unsigned long fds_bits[1024 / (8 * sizeof(long))];
20676   } __kernel_fd_set;
20677   
20678   
20679   typedef void (*__kernel_sighandler_t)(int);
20680   
20681   
20682   typedef int __kernel_key_t;
20683   typedef int __kernel_mqd_t;
20684   
20685   # 1 "/usr/include/x86_64-linux-gnu/asm/posix_types.h" 1 3 4
20686   
20687   
20688   
20689   
20690   
20691   
20692   # 1 "/usr/include/x86_64-linux-gnu/asm/posix_types_64.h" 1 3 4
20693   # 11 "/usr/include/x86_64-linux-gnu/asm/posix_types_64.h" 3 4
20694   typedef unsigned short __kernel_old_uid_t;
20695   typedef unsigned short __kernel_old_gid_t;
20696   
20697   
20698   typedef unsigned long __kernel_old_dev_t;
20699   
20700   
20701   # 1 "/usr/include/asm-generic/posix_types.h" 1 3 4
20702   
20703   
20704   
20705   
20706   # 1 "/usr/include/x86_64-linux-gnu/asm/bitsperlong.h" 1 3 4
20707   # 11 "/usr/include/x86_64-linux-gnu/asm/bitsperlong.h" 3 4
20708   # 1 "/usr/include/asm-generic/bitsperlong.h" 1 3 4
20709   # 12 "/usr/include/x86_64-linux-gnu/asm/bitsperlong.h" 2 3 4
20710   # 6 "/usr/include/asm-generic/posix_types.h" 2 3 4
20711   # 15 "/usr/include/asm-generic/posix_types.h" 3 4
20712   typedef long __kernel_long_t;
20713   typedef unsigned long __kernel_ulong_t;
20714   
20715   
20716   
20717   typedef __kernel_ulong_t __kernel_ino_t;
20718   
20719   
20720   
20721   typedef unsigned int __kernel_mode_t;
20722   
20723   
20724   
20725   typedef int __kernel_pid_t;
20726   
20727   
20728   
20729   typedef int __kernel_ipc_pid_t;
20730   
20731   
20732   
20733   typedef unsigned int __kernel_uid_t;
20734   typedef unsigned int __kernel_gid_t;
20735   
20736   
20737   
20738   typedef __kernel_long_t __kernel_suseconds_t;
20739   
20740   
20741   
20742   typedef int __kernel_daddr_t;
20743   
20744   
20745   
20746   typedef unsigned int __kernel_uid32_t;
20747   typedef unsigned int __kernel_gid32_t;
20748   # 72 "/usr/include/asm-generic/posix_types.h" 3 4
20749   typedef __kernel_ulong_t __kernel_size_t;
20750   typedef __kernel_long_t __kernel_ssize_t;
20751   typedef __kernel_long_t __kernel_ptrdiff_t;
20752   
20753   
20754   
20755   
20756   typedef struct {
20757    int val[2];
20758   } __kernel_fsid_t;
20759   
20760   
20761   
20762   
20763   
20764   typedef __kernel_long_t __kernel_off_t;
20765   typedef long long __kernel_loff_t;
20766   typedef __kernel_long_t __kernel_old_time_t;
20767   typedef __kernel_long_t __kernel_time_t;
20768   typedef long long __kernel_time64_t;
20769   typedef __kernel_long_t __kernel_clock_t;
20770   typedef int __kernel_timer_t;
20771   typedef int __kernel_clockid_t;
20772   typedef char * __kernel_caddr_t;
20773   typedef unsigned short __kernel_uid16_t;
20774   typedef unsigned short __kernel_gid16_t;
20775   # 19 "/usr/include/x86_64-linux-gnu/asm/posix_types_64.h" 2 3 4
20776   # 8 "/usr/include/x86_64-linux-gnu/asm/posix_types.h" 2 3 4
20777   # 37 "/usr/include/linux/posix_types.h" 2 3 4
20778   # 6 "/usr/include/asm-generic/socket.h" 2 3 4
20779   # 1 "/usr/include/x86_64-linux-gnu/asm/sockios.h" 1 3 4
20780   # 1 "/usr/include/asm-generic/sockios.h" 1 3 4
20781   # 2 "/usr/include/x86_64-linux-gnu/asm/sockios.h" 2 3 4
20782   # 7 "/usr/include/asm-generic/socket.h" 2 3 4
20783   # 2 "/usr/include/x86_64-linux-gnu/asm/socket.h" 2 3 4
20784   # 357 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4
20785   
20786   
20787   
20788   
20789   
20790   
20791   struct linger
20792     {
20793       int l_onoff;
20794       int l_linger;
20795     };
20796   # 34 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4
20797   
20798   
20799   # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_osockaddr.h" 1 3 4
20800   
20801   
20802   
20803   
20804   
20805   struct osockaddr
20806   {
20807     unsigned short int sa_family;
20808     unsigned char sa_data[14];
20809   };
20810   # 37 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4
20811   
20812   
20813   
20814   
20815   enum
20816   {
20817     SHUT_RD = 0,
20818   
20819     SHUT_WR,
20820   
20821     SHUT_RDWR
20822   
20823   };
20824   # 102 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
20825   extern int socket (int __domain, int __type, int __protocol) __attribute__ ((__nothrow__ , __leaf__));
20826   
20827   
20828   
20829   
20830   
20831   extern int socketpair (int __domain, int __type, int __protocol,
20832            int __fds[2]) __attribute__ ((__nothrow__ , __leaf__));
20833   
20834   
20835   extern int bind (int __fd, const struct sockaddr * __addr, socklen_t __len)
20836        __attribute__ ((__nothrow__ , __leaf__));
20837   
20838   
20839   extern int getsockname (int __fd, struct sockaddr *__restrict __addr,
20840      socklen_t *__restrict __len) __attribute__ ((__nothrow__ , __leaf__));
20841   # 126 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
20842   extern int connect (int __fd, const struct sockaddr * __addr, socklen_t __len);
20843   
20844   
20845   
20846   extern int getpeername (int __fd, struct sockaddr *__restrict __addr,
20847      socklen_t *__restrict __len) __attribute__ ((__nothrow__ , __leaf__));
20848   
20849   
20850   
20851   
20852   
20853   
20854   extern ssize_t send (int __fd, const void *__buf, size_t __n, int __flags);
20855   
20856   
20857   
20858   
20859   
20860   
20861   extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags);
20862   
20863   
20864   
20865   
20866   
20867   
20868   extern ssize_t sendto (int __fd, const void *__buf, size_t __n,
20869            int __flags, const struct sockaddr * __addr,
20870            socklen_t __addr_len);
20871   # 163 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
20872   extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,
20873       int __flags, struct sockaddr *__restrict __addr,
20874       socklen_t *__restrict __addr_len);
20875   # 174 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
20876   extern ssize_t sendmsg (int __fd, const struct msghdr *__message,
20877      int __flags);
20878   # 216 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
20879   extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags);
20880   # 255 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
20881   extern int getsockopt (int __fd, int __level, int __optname,
20882            void *__restrict __optval,
20883            socklen_t *__restrict __optlen) __attribute__ ((__nothrow__ , __leaf__));
20884   # 277 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
20885   extern int setsockopt (int __fd, int __level, int __optname,
20886            const void *__optval, socklen_t __optlen) __attribute__ ((__nothrow__ , __leaf__));
20887   # 296 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
20888   extern int listen (int __fd, int __n) __attribute__ ((__nothrow__ , __leaf__));
20889   # 306 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
20890   extern int accept (int __fd, struct sockaddr *__restrict __addr,
20891        socklen_t *__restrict __addr_len);
20892   # 324 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4
20893   extern int shutdown (int __fd, int __how) __attribute__ ((__nothrow__ , __leaf__));
20894   
20895   
20896   
20897   
20898   extern int sockatmark (int __fd) __attribute__ ((__nothrow__ , __leaf__));
20899   
20900   
20901   
20902   
20903   
20904   
20905   
20906   extern int isfdtype (int __fd, int __fdtype) __attribute__ ((__nothrow__ , __leaf__));
20907   
20908   
20909   
20910   
20911   
20912   # 1 "/usr/include/x86_64-linux-gnu/bits/socket2.h" 1 3 4
20913   # 23 "/usr/include/x86_64-linux-gnu/bits/socket2.h" 3 4
20914   extern ssize_t __recv_chk (int __fd, void *__buf, size_t __n, size_t __buflen,
20915         int __flags);
20916   extern ssize_t __recv_alias (int __fd, void *__buf, size_t __n, int __flags) __asm__ ("" "recv")
20917                             ;
20918   extern ssize_t __recv_chk_warn (int __fd, void *__buf, size_t __n, size_t __buflen, int __flags) __asm__ ("" "__recv_chk")
20919   
20920   
20921        __attribute__((__warning__ ("recv called with bigger length than size of destination " "buffer")))
20922               ;
20923   
20924   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) ssize_t
20925   recv (int __fd, void *__buf, size_t __n, int __flags)
20926   {
20927     size_t sz = __builtin_object_size (__buf, 0);
20928     if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && (((long unsigned int) (__n)) <= (sz) / (sizeof (char)))))
20929       return __recv_alias (__fd, __buf, __n, __flags);
20930     if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && !(((long unsigned int) (__n)) <= (sz) / (sizeof (char)))))
20931       return __recv_chk_warn (__fd, __buf, __n, sz, __flags);
20932     return __recv_chk (__fd, __buf, __n, sz, __flags);
20933   }
20934   
20935   extern ssize_t __recvfrom_chk (int __fd, void *__restrict __buf, size_t __n,
20936             size_t __buflen, int __flags,
20937             struct sockaddr *__restrict __addr,
20938             socklen_t *__restrict __addr_len);
20939   extern ssize_t __recvfrom_alias (int __fd, void *__restrict __buf, size_t __n, int __flags, struct sockaddr *__restrict __addr, socklen_t *__restrict __addr_len) __asm__ ("" "recvfrom")
20940   
20941   
20942                                                      ;
20943   extern ssize_t __recvfrom_chk_warn (int __fd, void *__restrict __buf, size_t __n, size_t __buflen, int __flags, struct sockaddr *__restrict __addr, socklen_t *__restrict __addr_len) __asm__ ("" "__recvfrom_chk")
20944   
20945   
20946   
20947   
20948        __attribute__((__warning__ ("recvfrom called with bigger length than size of " "destination buffer")))
20949                           ;
20950   
20951   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) ssize_t
20952   recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags,
20953      struct sockaddr *__restrict __addr, socklen_t *__restrict __addr_len)
20954   {
20955     size_t sz = __builtin_object_size (__buf, 0);
20956     if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && (((long unsigned int) (__n)) <= (sz) / (sizeof (char)))))
20957       return __recvfrom_alias (__fd, __buf, __n, __flags, __addr, __addr_len);
20958     if ((((__typeof (__n)) 0 < (__typeof (__n)) -1 || (__builtin_constant_p (__n) && (__n) > 0)) && __builtin_constant_p ((((long unsigned int) (__n)) <= (sz) / (sizeof (char)))) && !(((long unsigned int) (__n)) <= (sz) / (sizeof (char)))))
20959       return __recvfrom_chk_warn (__fd, __buf, __n, sz, __flags, __addr,
20960       __addr_len);
20961     return __recvfrom_chk (__fd, __buf, __n, sz, __flags, __addr, __addr_len);
20962   }
20963   # 344 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4
20964   
20965   
20966   
20967   # 24 "/usr/include/netinet/in.h" 2 3 4
20968   
20969   
20970   
20971   
20972   
20973   
20974   typedef uint32_t in_addr_t;
20975   struct in_addr
20976     {
20977       in_addr_t s_addr;
20978     };
20979   
20980   
20981   # 1 "/usr/include/x86_64-linux-gnu/bits/in.h" 1 3 4
20982   # 143 "/usr/include/x86_64-linux-gnu/bits/in.h" 3 4
20983   struct ip_opts
20984     {
20985       struct in_addr ip_dst;
20986       char ip_opts[40];
20987     };
20988   
20989   
20990   struct ip_mreqn
20991     {
20992       struct in_addr imr_multiaddr;
20993       struct in_addr imr_address;
20994       int imr_ifindex;
20995     };
20996   
20997   
20998   struct in_pktinfo
20999     {
21000       int ipi_ifindex;
21001       struct in_addr ipi_spec_dst;
21002       struct in_addr ipi_addr;
21003     };
21004   # 38 "/usr/include/netinet/in.h" 2 3 4
21005   
21006   
21007   enum
21008     {
21009       IPPROTO_IP = 0,
21010   
21011       IPPROTO_ICMP = 1,
21012   
21013       IPPROTO_IGMP = 2,
21014   
21015       IPPROTO_IPIP = 4,
21016   
21017       IPPROTO_TCP = 6,
21018   
21019       IPPROTO_EGP = 8,
21020   
21021       IPPROTO_PUP = 12,
21022   
21023       IPPROTO_UDP = 17,
21024   
21025       IPPROTO_IDP = 22,
21026   
21027       IPPROTO_TP = 29,
21028   
21029       IPPROTO_DCCP = 33,
21030   
21031       IPPROTO_IPV6 = 41,
21032   
21033       IPPROTO_RSVP = 46,
21034   
21035       IPPROTO_GRE = 47,
21036   
21037       IPPROTO_ESP = 50,
21038   
21039       IPPROTO_AH = 51,
21040   
21041       IPPROTO_MTP = 92,
21042   
21043       IPPROTO_BEETPH = 94,
21044   
21045       IPPROTO_ENCAP = 98,
21046   
21047       IPPROTO_PIM = 103,
21048   
21049       IPPROTO_COMP = 108,
21050   
21051       IPPROTO_SCTP = 132,
21052   
21053       IPPROTO_UDPLITE = 136,
21054   
21055       IPPROTO_MPLS = 137,
21056   
21057       IPPROTO_ETHERNET = 143,
21058   
21059       IPPROTO_RAW = 255,
21060   
21061       IPPROTO_MPTCP = 262,
21062   
21063       IPPROTO_MAX
21064     };
21065   
21066   
21067   
21068   
21069   
21070   enum
21071     {
21072       IPPROTO_HOPOPTS = 0,
21073   
21074       IPPROTO_ROUTING = 43,
21075   
21076       IPPROTO_FRAGMENT = 44,
21077   
21078       IPPROTO_ICMPV6 = 58,
21079   
21080       IPPROTO_NONE = 59,
21081   
21082       IPPROTO_DSTOPTS = 60,
21083   
21084       IPPROTO_MH = 135
21085   
21086     };
21087   
21088   
21089   
21090   typedef uint16_t in_port_t;
21091   
21092   
21093   enum
21094     {
21095       IPPORT_ECHO = 7,
21096       IPPORT_DISCARD = 9,
21097       IPPORT_SYSTAT = 11,
21098       IPPORT_DAYTIME = 13,
21099       IPPORT_NETSTAT = 15,
21100       IPPORT_FTP = 21,
21101       IPPORT_TELNET = 23,
21102       IPPORT_SMTP = 25,
21103       IPPORT_TIMESERVER = 37,
21104       IPPORT_NAMESERVER = 42,
21105       IPPORT_WHOIS = 43,
21106       IPPORT_MTP = 57,
21107   
21108       IPPORT_TFTP = 69,
21109       IPPORT_RJE = 77,
21110       IPPORT_FINGER = 79,
21111       IPPORT_TTYLINK = 87,
21112       IPPORT_SUPDUP = 95,
21113   
21114   
21115       IPPORT_EXECSERVER = 512,
21116       IPPORT_LOGINSERVER = 513,
21117       IPPORT_CMDSERVER = 514,
21118       IPPORT_EFSSERVER = 520,
21119   
21120   
21121       IPPORT_BIFFUDP = 512,
21122       IPPORT_WHOSERVER = 513,
21123       IPPORT_ROUTESERVER = 520,
21124   
21125   
21126       IPPORT_RESERVED = 1024,
21127   
21128   
21129       IPPORT_USERRESERVED = 5000
21130     };
21131   # 219 "/usr/include/netinet/in.h" 3 4
21132   struct in6_addr
21133     {
21134       union
21135         {
21136    uint8_t __u6_addr8[16];
21137    uint16_t __u6_addr16[8];
21138    uint32_t __u6_addr32[4];
21139         } __in6_u;
21140   
21141   
21142   
21143   
21144   
21145     };
21146   
21147   
21148   extern const struct in6_addr in6addr_any;
21149   extern const struct in6_addr in6addr_loopback;
21150   # 245 "/usr/include/netinet/in.h" 3 4
21151   struct sockaddr_in
21152     {
21153       sa_family_t sin_family;
21154       in_port_t sin_port;
21155       struct in_addr sin_addr;
21156   
21157   
21158       unsigned char sin_zero[sizeof (struct sockaddr)
21159         - (sizeof (unsigned short int))
21160         - sizeof (in_port_t)
21161         - sizeof (struct in_addr)];
21162     };
21163   
21164   
21165   
21166   struct sockaddr_in6
21167     {
21168       sa_family_t sin6_family;
21169       in_port_t sin6_port;
21170       uint32_t sin6_flowinfo;
21171       struct in6_addr sin6_addr;
21172       uint32_t sin6_scope_id;
21173     };
21174   
21175   
21176   
21177   
21178   struct ip_mreq
21179     {
21180   
21181       struct in_addr imr_multiaddr;
21182   
21183   
21184       struct in_addr imr_interface;
21185     };
21186   
21187   struct ip_mreq_source
21188     {
21189   
21190       struct in_addr imr_multiaddr;
21191   
21192   
21193       struct in_addr imr_interface;
21194   
21195   
21196       struct in_addr imr_sourceaddr;
21197     };
21198   
21199   
21200   
21201   
21202   struct ipv6_mreq
21203     {
21204   
21205       struct in6_addr ipv6mr_multiaddr;
21206   
21207   
21208       unsigned int ipv6mr_interface;
21209     };
21210   
21211   
21212   
21213   
21214   struct group_req
21215     {
21216   
21217       uint32_t gr_interface;
21218   
21219   
21220       struct sockaddr_storage gr_group;
21221     };
21222   
21223   struct group_source_req
21224     {
21225   
21226       uint32_t gsr_interface;
21227   
21228   
21229       struct sockaddr_storage gsr_group;
21230   
21231   
21232       struct sockaddr_storage gsr_source;
21233     };
21234   
21235   
21236   
21237   struct ip_msfilter
21238     {
21239   
21240       struct in_addr imsf_multiaddr;
21241   
21242   
21243       struct in_addr imsf_interface;
21244   
21245   
21246       uint32_t imsf_fmode;
21247   
21248   
21249       uint32_t imsf_numsrc;
21250   
21251       struct in_addr imsf_slist[1];
21252     };
21253   
21254   
21255   
21256   
21257   
21258   struct group_filter
21259     {
21260   
21261       uint32_t gf_interface;
21262   
21263   
21264       struct sockaddr_storage gf_group;
21265   
21266   
21267       uint32_t gf_fmode;
21268   
21269   
21270       uint32_t gf_numsrc;
21271   
21272       struct sockaddr_storage gf_slist[1];
21273   };
21274   # 382 "/usr/include/netinet/in.h" 3 4
21275   extern uint32_t ntohl (uint32_t __netlong) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
21276   extern uint16_t ntohs (uint16_t __netshort)
21277        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
21278   extern uint32_t htonl (uint32_t __hostlong)
21279        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
21280   extern uint16_t htons (uint16_t __hostshort)
21281        __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
21282   
21283   
21284   
21285   
21286   # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4
21287   # 394 "/usr/include/netinet/in.h" 2 3 4
21288   # 1 "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" 1 3 4
21289   # 395 "/usr/include/netinet/in.h" 2 3 4
21290   # 510 "/usr/include/netinet/in.h" 3 4
21291   extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __attribute__ ((__nothrow__ , __leaf__));
21292   
21293   
21294   extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in)
21295        __attribute__ ((__nothrow__ , __leaf__));
21296   # 638 "/usr/include/netinet/in.h" 3 4
21297   
21298   # 28 "/usr/include/netdb.h" 2 3 4
21299   
21300   
21301   
21302   
21303   # 1 "/usr/include/rpc/netdb.h" 1 3 4
21304   # 42 "/usr/include/rpc/netdb.h" 3 4
21305   # 1 "/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h" 1 3 4
21306   # 43 "/usr/include/rpc/netdb.h" 2 3 4
21307   
21308   
21309   
21310   struct rpcent
21311   {
21312     char *r_name;
21313     char **r_aliases;
21314     int r_number;
21315   };
21316   
21317   extern void setrpcent (int __stayopen) __attribute__ ((__nothrow__ , __leaf__));
21318   extern void endrpcent (void) __attribute__ ((__nothrow__ , __leaf__));
21319   extern struct rpcent *getrpcbyname (const char *__name) __attribute__ ((__nothrow__ , __leaf__));
21320   extern struct rpcent *getrpcbynumber (int __number) __attribute__ ((__nothrow__ , __leaf__));
21321   extern struct rpcent *getrpcent (void) __attribute__ ((__nothrow__ , __leaf__));
21322   
21323   
21324   extern int getrpcbyname_r (const char *__name, struct rpcent *__result_buf,
21325         char *__buffer, size_t __buflen,
21326         struct rpcent **__result) __attribute__ ((__nothrow__ , __leaf__));
21327   
21328   extern int getrpcbynumber_r (int __number, struct rpcent *__result_buf,
21329           char *__buffer, size_t __buflen,
21330           struct rpcent **__result) __attribute__ ((__nothrow__ , __leaf__));
21331   
21332   extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer,
21333      size_t __buflen, struct rpcent **__result) __attribute__ ((__nothrow__ , __leaf__));
21334   
21335   
21336   
21337   # 33 "/usr/include/netdb.h" 2 3 4
21338   
21339   
21340   
21341   
21342   
21343   
21344   
21345   # 1 "/usr/include/x86_64-linux-gnu/bits/netdb.h" 1 3 4
21346   # 26 "/usr/include/x86_64-linux-gnu/bits/netdb.h" 3 4
21347   struct netent
21348   {
21349     char *n_name;
21350     char **n_aliases;
21351     int n_addrtype;
21352     uint32_t n_net;
21353   };
21354   # 41 "/usr/include/netdb.h" 2 3 4
21355   # 51 "/usr/include/netdb.h" 3 4
21356   
21357   
21358   
21359   
21360   
21361   
21362   
21363   
21364   extern int *__h_errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
21365   # 90 "/usr/include/netdb.h" 3 4
21366   extern void herror (const char *__str) __attribute__ ((__nothrow__ , __leaf__));
21367   
21368   
21369   extern const char *hstrerror (int __err_num) __attribute__ ((__nothrow__ , __leaf__));
21370   
21371   
21372   
21373   
21374   struct hostent
21375   {
21376     char *h_name;
21377     char **h_aliases;
21378     int h_addrtype;
21379     int h_length;
21380     char **h_addr_list;
21381   
21382   
21383   
21384   };
21385   
21386   
21387   
21388   
21389   
21390   
21391   extern void sethostent (int __stay_open);
21392   
21393   
21394   
21395   
21396   
21397   extern void endhostent (void);
21398   
21399   
21400   
21401   
21402   
21403   
21404   extern struct hostent *gethostent (void);
21405   
21406   
21407   
21408   
21409   
21410   
21411   extern struct hostent *gethostbyaddr (const void *__addr, __socklen_t __len,
21412             int __type);
21413   
21414   
21415   
21416   
21417   
21418   extern struct hostent *gethostbyname (const char *__name);
21419   # 153 "/usr/include/netdb.h" 3 4
21420   extern struct hostent *gethostbyname2 (const char *__name, int __af);
21421   # 165 "/usr/include/netdb.h" 3 4
21422   extern int gethostent_r (struct hostent *__restrict __result_buf,
21423       char *__restrict __buf, size_t __buflen,
21424       struct hostent **__restrict __result,
21425       int *__restrict __h_errnop);
21426   
21427   extern int gethostbyaddr_r (const void *__restrict __addr, __socklen_t __len,
21428          int __type,
21429          struct hostent *__restrict __result_buf,
21430          char *__restrict __buf, size_t __buflen,
21431          struct hostent **__restrict __result,
21432          int *__restrict __h_errnop);
21433   
21434   extern int gethostbyname_r (const char *__restrict __name,
21435          struct hostent *__restrict __result_buf,
21436          char *__restrict __buf, size_t __buflen,
21437          struct hostent **__restrict __result,
21438          int *__restrict __h_errnop);
21439   
21440   extern int gethostbyname2_r (const char *__restrict __name, int __af,
21441           struct hostent *__restrict __result_buf,
21442           char *__restrict __buf, size_t __buflen,
21443           struct hostent **__restrict __result,
21444           int *__restrict __h_errnop);
21445   # 196 "/usr/include/netdb.h" 3 4
21446   extern void setnetent (int __stay_open);
21447   
21448   
21449   
21450   
21451   
21452   extern void endnetent (void);
21453   
21454   
21455   
21456   
21457   
21458   
21459   extern struct netent *getnetent (void);
21460   
21461   
21462   
21463   
21464   
21465   
21466   extern struct netent *getnetbyaddr (uint32_t __net, int __type);
21467   
21468   
21469   
21470   
21471   
21472   extern struct netent *getnetbyname (const char *__name);
21473   # 235 "/usr/include/netdb.h" 3 4
21474   extern int getnetent_r (struct netent *__restrict __result_buf,
21475      char *__restrict __buf, size_t __buflen,
21476      struct netent **__restrict __result,
21477      int *__restrict __h_errnop);
21478   
21479   extern int getnetbyaddr_r (uint32_t __net, int __type,
21480         struct netent *__restrict __result_buf,
21481         char *__restrict __buf, size_t __buflen,
21482         struct netent **__restrict __result,
21483         int *__restrict __h_errnop);
21484   
21485   extern int getnetbyname_r (const char *__restrict __name,
21486         struct netent *__restrict __result_buf,
21487         char *__restrict __buf, size_t __buflen,
21488         struct netent **__restrict __result,
21489         int *__restrict __h_errnop);
21490   
21491   
21492   
21493   
21494   struct servent
21495   {
21496     char *s_name;
21497     char **s_aliases;
21498     int s_port;
21499     char *s_proto;
21500   };
21501   
21502   
21503   
21504   
21505   
21506   
21507   extern void setservent (int __stay_open);
21508   
21509   
21510   
21511   
21512   
21513   extern void endservent (void);
21514   
21515   
21516   
21517   
21518   
21519   
21520   extern struct servent *getservent (void);
21521   
21522   
21523   
21524   
21525   
21526   
21527   extern struct servent *getservbyname (const char *__name, const char *__proto);
21528   
21529   
21530   
21531   
21532   
21533   
21534   extern struct servent *getservbyport (int __port, const char *__proto);
21535   # 306 "/usr/include/netdb.h" 3 4
21536   extern int getservent_r (struct servent *__restrict __result_buf,
21537       char *__restrict __buf, size_t __buflen,
21538       struct servent **__restrict __result);
21539   
21540   extern int getservbyname_r (const char *__restrict __name,
21541          const char *__restrict __proto,
21542          struct servent *__restrict __result_buf,
21543          char *__restrict __buf, size_t __buflen,
21544          struct servent **__restrict __result);
21545   
21546   extern int getservbyport_r (int __port, const char *__restrict __proto,
21547          struct servent *__restrict __result_buf,
21548          char *__restrict __buf, size_t __buflen,
21549          struct servent **__restrict __result);
21550   
21551   
21552   
21553   
21554   struct protoent
21555   {
21556     char *p_name;
21557     char **p_aliases;
21558     int p_proto;
21559   };
21560   
21561   
21562   
21563   
21564   
21565   
21566   extern void setprotoent (int __stay_open);
21567   
21568   
21569   
21570   
21571   
21572   extern void endprotoent (void);
21573   
21574   
21575   
21576   
21577   
21578   
21579   extern struct protoent *getprotoent (void);
21580   
21581   
21582   
21583   
21584   
21585   extern struct protoent *getprotobyname (const char *__name);
21586   
21587   
21588   
21589   
21590   
21591   extern struct protoent *getprotobynumber (int __proto);
21592   # 372 "/usr/include/netdb.h" 3 4
21593   extern int getprotoent_r (struct protoent *__restrict __result_buf,
21594        char *__restrict __buf, size_t __buflen,
21595        struct protoent **__restrict __result);
21596   
21597   extern int getprotobyname_r (const char *__restrict __name,
21598           struct protoent *__restrict __result_buf,
21599           char *__restrict __buf, size_t __buflen,
21600           struct protoent **__restrict __result);
21601   
21602   extern int getprotobynumber_r (int __proto,
21603             struct protoent *__restrict __result_buf,
21604             char *__restrict __buf, size_t __buflen,
21605             struct protoent **__restrict __result);
21606   # 393 "/usr/include/netdb.h" 3 4
21607   extern int setnetgrent (const char *__netgroup);
21608   
21609   
21610   
21611   
21612   
21613   
21614   
21615   extern void endnetgrent (void);
21616   # 410 "/usr/include/netdb.h" 3 4
21617   extern int getnetgrent (char **__restrict __hostp,
21618      char **__restrict __userp,
21619      char **__restrict __domainp);
21620   # 421 "/usr/include/netdb.h" 3 4
21621   extern int innetgr (const char *__netgroup, const char *__host,
21622         const char *__user, const char *__domain);
21623   
21624   
21625   
21626   
21627   
21628   
21629   
21630   extern int getnetgrent_r (char **__restrict __hostp,
21631        char **__restrict __userp,
21632        char **__restrict __domainp,
21633        char *__restrict __buffer, size_t __buflen);
21634   # 449 "/usr/include/netdb.h" 3 4
21635   extern int rcmd (char **__restrict __ahost, unsigned short int __rport,
21636      const char *__restrict __locuser,
21637      const char *__restrict __remuser,
21638      const char *__restrict __cmd, int *__restrict __fd2p);
21639   # 461 "/usr/include/netdb.h" 3 4
21640   extern int rcmd_af (char **__restrict __ahost, unsigned short int __rport,
21641         const char *__restrict __locuser,
21642         const char *__restrict __remuser,
21643         const char *__restrict __cmd, int *__restrict __fd2p,
21644         sa_family_t __af);
21645   # 477 "/usr/include/netdb.h" 3 4
21646   extern int rexec (char **__restrict __ahost, int __rport,
21647       const char *__restrict __name,
21648       const char *__restrict __pass,
21649       const char *__restrict __cmd, int *__restrict __fd2p);
21650   # 489 "/usr/include/netdb.h" 3 4
21651   extern int rexec_af (char **__restrict __ahost, int __rport,
21652          const char *__restrict __name,
21653          const char *__restrict __pass,
21654          const char *__restrict __cmd, int *__restrict __fd2p,
21655          sa_family_t __af);
21656   # 503 "/usr/include/netdb.h" 3 4
21657   extern int ruserok (const char *__rhost, int __suser,
21658         const char *__remuser, const char *__locuser);
21659   # 513 "/usr/include/netdb.h" 3 4
21660   extern int ruserok_af (const char *__rhost, int __suser,
21661            const char *__remuser, const char *__locuser,
21662            sa_family_t __af);
21663   # 526 "/usr/include/netdb.h" 3 4
21664   extern int iruserok (uint32_t __raddr, int __suser,
21665          const char *__remuser, const char *__locuser);
21666   # 537 "/usr/include/netdb.h" 3 4
21667   extern int iruserok_af (const void *__raddr, int __suser,
21668      const char *__remuser, const char *__locuser,
21669      sa_family_t __af);
21670   # 549 "/usr/include/netdb.h" 3 4
21671   extern int rresvport (int *__alport);
21672   # 558 "/usr/include/netdb.h" 3 4
21673   extern int rresvport_af (int *__alport, sa_family_t __af);
21674   
21675   
21676   
21677   
21678   
21679   
21680   struct addrinfo
21681   {
21682     int ai_flags;
21683     int ai_family;
21684     int ai_socktype;
21685     int ai_protocol;
21686     socklen_t ai_addrlen;
21687     struct sockaddr *ai_addr;
21688     char *ai_canonname;
21689     struct addrinfo *ai_next;
21690   };
21691   # 660 "/usr/include/netdb.h" 3 4
21692   extern int getaddrinfo (const char *__restrict __name,
21693      const char *__restrict __service,
21694      const struct addrinfo *__restrict __req,
21695      struct addrinfo **__restrict __pai);
21696   
21697   
21698   extern void freeaddrinfo (struct addrinfo *__ai) __attribute__ ((__nothrow__ , __leaf__));
21699   
21700   
21701   extern const char *gai_strerror (int __ecode) __attribute__ ((__nothrow__ , __leaf__));
21702   
21703   
21704   
21705   
21706   
21707   extern int getnameinfo (const struct sockaddr *__restrict __sa,
21708      socklen_t __salen, char *__restrict __host,
21709      socklen_t __hostlen, char *__restrict __serv,
21710      socklen_t __servlen, int __flags);
21711   # 722 "/usr/include/netdb.h" 3 4
21712   
21713   # 92 "include/internal/sockets.h" 2
21714   # 102 "include/internal/sockets.h"
21715   # 1 "/usr/include/x86_64-linux-gnu/sys/un.h" 1 3 4
21716   # 26 "/usr/include/x86_64-linux-gnu/sys/un.h" 3 4
21717   
21718   
21719   
21720   struct sockaddr_un
21721     {
21722       sa_family_t sun_family;
21723       char sun_path[108];
21724     };
21725   # 44 "/usr/include/x86_64-linux-gnu/sys/un.h" 3 4
21726   
21727   # 103 "include/internal/sockets.h" 2
21728   # 111 "include/internal/sockets.h"
21729   # 1 "/usr/include/arpa/inet.h" 1 3 4
21730   # 30 "/usr/include/arpa/inet.h" 3 4
21731   
21732   
21733   
21734   
21735   extern in_addr_t inet_addr (const char *__cp) __attribute__ ((__nothrow__ , __leaf__));
21736   
21737   
21738   extern in_addr_t inet_lnaof (struct in_addr __in) __attribute__ ((__nothrow__ , __leaf__));
21739   
21740   
21741   
21742   extern struct in_addr inet_makeaddr (in_addr_t __net, in_addr_t __host)
21743        __attribute__ ((__nothrow__ , __leaf__));
21744   
21745   
21746   extern in_addr_t inet_netof (struct in_addr __in) __attribute__ ((__nothrow__ , __leaf__));
21747   
21748   
21749   
21750   extern in_addr_t inet_network (const char *__cp) __attribute__ ((__nothrow__ , __leaf__));
21751   
21752   
21753   
21754   extern char *inet_ntoa (struct in_addr __in) __attribute__ ((__nothrow__ , __leaf__));
21755   
21756   
21757   
21758   
21759   extern int inet_pton (int __af, const char *__restrict __cp,
21760           void *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
21761   
21762   
21763   
21764   
21765   extern const char *inet_ntop (int __af, const void *__restrict __cp,
21766            char *__restrict __buf, socklen_t __len)
21767        __attribute__ ((__nothrow__ , __leaf__));
21768   
21769   
21770   
21771   
21772   
21773   
21774   extern int inet_aton (const char *__cp, struct in_addr *__inp) __attribute__ ((__nothrow__ , __leaf__));
21775   
21776   
21777   
21778   extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__))
21779     __attribute__ ((__deprecated__ ("Use inet_ntop instead")));
21780   
21781   
21782   
21783   
21784   extern char *inet_net_ntop (int __af, const void *__cp, int __bits,
21785          char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__));
21786   
21787   
21788   
21789   
21790   extern int inet_net_pton (int __af, const char *__cp,
21791        void *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__));
21792   
21793   
21794   
21795   
21796   extern unsigned int inet_nsap_addr (const char *__cp,
21797           unsigned char *__buf, int __len) __attribute__ ((__nothrow__ , __leaf__));
21798   
21799   
21800   
21801   extern char *inet_nsap_ntoa (int __len, const unsigned char *__cp,
21802           char *__buf) __attribute__ ((__nothrow__ , __leaf__));
21803   
21804   
21805   
21806   # 112 "include/internal/sockets.h" 2
21807   # 1 "/usr/include/netinet/tcp.h" 1 3 4
21808   # 93 "/usr/include/netinet/tcp.h" 3 4
21809   typedef uint32_t tcp_seq;
21810   
21811   
21812   
21813   
21814   struct tcphdr
21815     {
21816       __extension__ union
21817       {
21818         struct
21819         {
21820    uint16_t th_sport;
21821    uint16_t th_dport;
21822    tcp_seq th_seq;
21823    tcp_seq th_ack;
21824   
21825    uint8_t th_x2:4;
21826    uint8_t th_off:4;
21827   
21828   
21829   
21830   
21831   
21832    uint8_t th_flags;
21833   
21834   
21835   
21836   
21837   
21838   
21839    uint16_t th_win;
21840    uint16_t th_sum;
21841    uint16_t th_urp;
21842         };
21843         struct
21844         {
21845    uint16_t source;
21846    uint16_t dest;
21847    uint32_t seq;
21848    uint32_t ack_seq;
21849   
21850    uint16_t res1:4;
21851    uint16_t doff:4;
21852    uint16_t fin:1;
21853    uint16_t syn:1;
21854    uint16_t rst:1;
21855    uint16_t psh:1;
21856    uint16_t ack:1;
21857    uint16_t urg:1;
21858    uint16_t res2:2;
21859   # 156 "/usr/include/netinet/tcp.h" 3 4
21860    uint16_t window;
21861    uint16_t check;
21862    uint16_t urg_ptr;
21863         };
21864       };
21865   };
21866   
21867   enum
21868   {
21869     TCP_ESTABLISHED = 1,
21870     TCP_SYN_SENT,
21871     TCP_SYN_RECV,
21872     TCP_FIN_WAIT1,
21873     TCP_FIN_WAIT2,
21874     TCP_TIME_WAIT,
21875     TCP_CLOSE,
21876     TCP_CLOSE_WAIT,
21877     TCP_LAST_ACK,
21878     TCP_LISTEN,
21879     TCP_CLOSING
21880   };
21881   # 217 "/usr/include/netinet/tcp.h" 3 4
21882   enum tcp_ca_state
21883   {
21884     TCP_CA_Open = 0,
21885     TCP_CA_Disorder = 1,
21886     TCP_CA_CWR = 2,
21887     TCP_CA_Recovery = 3,
21888     TCP_CA_Loss = 4
21889   };
21890   
21891   struct tcp_info
21892   {
21893     uint8_t tcpi_state;
21894     uint8_t tcpi_ca_state;
21895     uint8_t tcpi_retransmits;
21896     uint8_t tcpi_probes;
21897     uint8_t tcpi_backoff;
21898     uint8_t tcpi_options;
21899     uint8_t tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
21900   
21901     uint32_t tcpi_rto;
21902     uint32_t tcpi_ato;
21903     uint32_t tcpi_snd_mss;
21904     uint32_t tcpi_rcv_mss;
21905   
21906     uint32_t tcpi_unacked;
21907     uint32_t tcpi_sacked;
21908     uint32_t tcpi_lost;
21909     uint32_t tcpi_retrans;
21910     uint32_t tcpi_fackets;
21911   
21912   
21913     uint32_t tcpi_last_data_sent;
21914     uint32_t tcpi_last_ack_sent;
21915     uint32_t tcpi_last_data_recv;
21916     uint32_t tcpi_last_ack_recv;
21917   
21918   
21919     uint32_t tcpi_pmtu;
21920     uint32_t tcpi_rcv_ssthresh;
21921     uint32_t tcpi_rtt;
21922     uint32_t tcpi_rttvar;
21923     uint32_t tcpi_snd_ssthresh;
21924     uint32_t tcpi_snd_cwnd;
21925     uint32_t tcpi_advmss;
21926     uint32_t tcpi_reordering;
21927   
21928     uint32_t tcpi_rcv_rtt;
21929     uint32_t tcpi_rcv_space;
21930   
21931     uint32_t tcpi_total_retrans;
21932   };
21933   # 276 "/usr/include/netinet/tcp.h" 3 4
21934   struct tcp_md5sig
21935   {
21936     struct sockaddr_storage tcpm_addr;
21937     uint8_t tcpm_flags;
21938     uint8_t tcpm_prefixlen;
21939     uint16_t tcpm_keylen;
21940     uint32_t __tcpm_pad;
21941     uint8_t tcpm_key[80];
21942   };
21943   
21944   
21945   struct tcp_repair_opt
21946   {
21947     uint32_t opt_code;
21948     uint32_t opt_val;
21949   };
21950   
21951   
21952   enum
21953   {
21954     TCP_NO_QUEUE,
21955     TCP_RECV_QUEUE,
21956     TCP_SEND_QUEUE,
21957     TCP_QUEUES_NR,
21958   };
21959   # 319 "/usr/include/netinet/tcp.h" 3 4
21960   struct tcp_cookie_transactions
21961   {
21962     uint16_t tcpct_flags;
21963     uint8_t __tcpct_pad1;
21964     uint8_t tcpct_cookie_desired;
21965     uint16_t tcpct_s_data_desired;
21966     uint16_t tcpct_used;
21967     uint8_t tcpct_value[536U];
21968   };
21969   
21970   
21971   struct tcp_repair_window
21972   {
21973     uint32_t snd_wl1;
21974     uint32_t snd_wnd;
21975     uint32_t max_window;
21976     uint32_t rcv_wnd;
21977     uint32_t rcv_wup;
21978   };
21979   
21980   
21981   struct tcp_zerocopy_receive
21982   {
21983     uint64_t address;
21984     uint32_t length;
21985     uint32_t recv_skip_hint;
21986   };
21987   # 113 "include/internal/sockets.h" 2
21988   # 121 "include/internal/sockets.h"
21989   # 1 "/usr/include/poll.h" 1 3 4
21990   # 1 "/usr/include/x86_64-linux-gnu/sys/poll.h" 1 3 4
21991   # 25 "/usr/include/x86_64-linux-gnu/sys/poll.h" 3 4
21992   # 1 "/usr/include/x86_64-linux-gnu/bits/poll.h" 1 3 4
21993   # 26 "/usr/include/x86_64-linux-gnu/sys/poll.h" 2 3 4
21994   
21995   
21996   
21997   
21998   
21999   
22000   
22001   typedef unsigned long int nfds_t;
22002   
22003   
22004   struct pollfd
22005     {
22006       int fd;
22007       short int events;
22008       short int revents;
22009     };
22010   
22011   
22012   
22013   # 54 "/usr/include/x86_64-linux-gnu/sys/poll.h" 3 4
22014   extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
22015       __attribute__ ((__access__ (__write_only__, 1, 2)));
22016   # 82 "/usr/include/x86_64-linux-gnu/sys/poll.h" 3 4
22017   
22018   
22019   
22020   
22021   
22022   # 1 "/usr/include/x86_64-linux-gnu/bits/poll2.h" 1 3 4
22023   # 24 "/usr/include/x86_64-linux-gnu/bits/poll2.h" 3 4
22024   
22025   
22026   extern int __poll_alias (struct pollfd *__fds, nfds_t __nfds, int __timeout) __asm__ ("" "poll")
22027                                  ;
22028   extern int __poll_chk (struct pollfd *__fds, nfds_t __nfds, int __timeout,
22029            long unsigned int __fdslen)
22030       __attribute__ ((__access__ (__write_only__, 1, 2)));
22031   extern int __poll_chk_warn (struct pollfd *__fds, nfds_t __nfds, int __timeout, long unsigned int __fdslen) __asm__ ("" "__poll_chk")
22032   
22033   
22034     __attribute__((__warning__ ("poll called with fds buffer too small file nfds entries")));
22035   
22036   extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__access__ (__write_only__, 1, 2))) int
22037   poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
22038   {
22039     return ((((__typeof (__nfds)) 0 < (__typeof (__nfds)) -1 || (__builtin_constant_p (__nfds) && (__nfds) > 0)) && __builtin_constant_p ((((long unsigned int) (__nfds)) <= (__builtin_object_size (__fds, 2 > 1)) / (sizeof (*__fds)))) && (((long unsigned int) (__nfds)) <= (__builtin_object_size (__fds, 2 > 1)) / (sizeof (*__fds)))) ? __poll_alias (__fds, __nfds, __timeout) : ((((__typeof (__nfds)) 0 < (__typeof (__nfds)) -1 || (__builtin_constant_p (__nfds) && (__nfds) > 0)) && __builtin_constant_p ((((long unsigned int) (__nfds)) <= (__builtin_object_size (__fds, 2 > 1)) / (sizeof (*__fds)))) && !(((long unsigned int) (__nfds)) <= (__builtin_object_size (__fds, 2 > 1)) / (sizeof (*__fds)))) ? __poll_chk_warn (__fds, __nfds, __timeout, __builtin_object_size (__fds, 2 > 1)) : __poll_chk (__fds, __nfds, __timeout, __builtin_object_size (__fds, 2 > 1))))
22040   
22041                                 ;
22042   }
22043   # 70 "/usr/include/x86_64-linux-gnu/bits/poll2.h" 3 4
22044   
22045   # 88 "/usr/include/x86_64-linux-gnu/sys/poll.h" 2 3 4
22046   # 2 "/usr/include/poll.h" 2 3 4
22047   # 122 "include/internal/sockets.h" 2
22048   
22049   
22050   
22051   
22052   
22053   # 1 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 1 3 4
22054   # 23 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 3 4
22055   
22056   
22057   
22058   # 1 "/usr/include/x86_64-linux-gnu/bits/ioctls.h" 1 3 4
22059   # 23 "/usr/include/x86_64-linux-gnu/bits/ioctls.h" 3 4
22060   # 1 "/usr/include/x86_64-linux-gnu/asm/ioctls.h" 1 3 4
22061   # 1 "/usr/include/asm-generic/ioctls.h" 1 3 4
22062   
22063   
22064   
22065   
22066   # 1 "/usr/include/linux/ioctl.h" 1 3 4
22067   
22068   
22069   
22070   
22071   # 1 "/usr/include/x86_64-linux-gnu/asm/ioctl.h" 1 3 4
22072   # 1 "/usr/include/asm-generic/ioctl.h" 1 3 4
22073   # 2 "/usr/include/x86_64-linux-gnu/asm/ioctl.h" 2 3 4
22074   # 6 "/usr/include/linux/ioctl.h" 2 3 4
22075   # 6 "/usr/include/asm-generic/ioctls.h" 2 3 4
22076   # 2 "/usr/include/x86_64-linux-gnu/asm/ioctls.h" 2 3 4
22077   # 24 "/usr/include/x86_64-linux-gnu/bits/ioctls.h" 2 3 4
22078   # 27 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 2 3 4
22079   
22080   
22081   # 1 "/usr/include/x86_64-linux-gnu/bits/ioctl-types.h" 1 3 4
22082   # 24 "/usr/include/x86_64-linux-gnu/bits/ioctl-types.h" 3 4
22083   # 1 "/usr/include/x86_64-linux-gnu/asm/ioctls.h" 1 3 4
22084   # 25 "/usr/include/x86_64-linux-gnu/bits/ioctl-types.h" 2 3 4
22085   
22086   
22087   struct winsize
22088     {
22089       unsigned short int ws_row;
22090       unsigned short int ws_col;
22091       unsigned short int ws_xpixel;
22092       unsigned short int ws_ypixel;
22093     };
22094   
22095   
22096   struct termio
22097     {
22098       unsigned short int c_iflag;
22099       unsigned short int c_oflag;
22100       unsigned short int c_cflag;
22101       unsigned short int c_lflag;
22102       unsigned char c_line;
22103       unsigned char c_cc[8];
22104   };
22105   # 30 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 2 3 4
22106   
22107   
22108   
22109   
22110   
22111   
22112   # 1 "/usr/include/x86_64-linux-gnu/sys/ttydefaults.h" 1 3 4
22113   # 37 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 2 3 4
22114   
22115   
22116   
22117   
22118   
22119   extern int ioctl (int __fd, unsigned long int __request, ...) __attribute__ ((__nothrow__ , __leaf__));
22120   # 53 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 3 4
22121   
22122   # 128 "include/internal/sockets.h" 2
22123   # 15 "include/internal/bio_addr.h" 2
22124   
22125   
22126   
22127   # 17 "include/internal/bio_addr.h"
22128   union bio_addr_st {
22129       struct sockaddr sa;
22130   
22131       struct sockaddr_in6 s_in6;
22132   
22133       struct sockaddr_in s_in;
22134   
22135       struct sockaddr_un s_un;
22136   
22137   };
22138   # 17 "include/internal/quic_demux.h" 2
22139   
22140   # 1 "include/internal/list.h" 1
22141   # 12 "include/internal/list.h"
22142           
22143   
22144   
22145   # 1 "/usr/include/assert.h" 1 3 4
22146   # 16 "include/internal/list.h" 2
22147   # 19 "include/internal/quic_demux.h" 2
22148   # 89 "include/internal/quic_demux.h"
22149   struct quic_urxe_st {
22150       struct { QUIC_URXE *next, *prev; } ossl_list_urxe;
22151   # 100 "include/internal/quic_demux.h"
22152       size_t data_len, alloc_len;
22153   
22154   
22155   
22156   
22157   
22158   
22159       uint64_t processed, hpr_removed;
22160   
22161   
22162   
22163   
22164   
22165       uint64_t datagram_id;
22166   
22167   
22168   
22169   
22170   
22171   
22172       BIO_ADDR peer, local;
22173   
22174   
22175   
22176   
22177   
22178       OSSL_TIME time;
22179   
22180   
22181   
22182   
22183   
22184       char deferred;
22185   
22186   
22187   
22188   
22189   
22190       char demux_state;
22191   };
22192   
22193   
22194   static __attribute__((unused)) inline unsigned char *
22195   ossl_quic_urxe_data(const QUIC_URXE *e)
22196   {
22197       return (unsigned char *)&e[1];
22198   }
22199   
22200   static __attribute__((unused)) inline unsigned char *
22201   ossl_quic_urxe_data_end(const QUIC_URXE *e)
22202   {
22203       return ossl_quic_urxe_data(e) + e->data_len;
22204   }
22205   
22206   
22207   typedef struct ossl_list_st_urxe OSSL_LIST_urxe; struct ossl_list_st_urxe { QUIC_URXE *alpha, *omega; size_t num_elems; }; static __attribute__((unused)) inline void ossl_list_urxe_init(OSSL_LIST_urxe *list) { memset(list, 0, sizeof(*list)); } static __attribute__((unused)) inline void ossl_list_urxe_init_elem(QUIC_URXE *elem) { memset(&elem->ossl_list_urxe, 0, sizeof(elem->ossl_list_urxe)); } static __attribute__((unused)) inline int ossl_list_urxe_is_empty(const OSSL_LIST_urxe *list) { return list->num_elems == 0; } static __attribute__((unused)) inline size_t ossl_list_urxe_num(const OSSL_LIST_urxe *list) { return list->num_elems; } static __attribute__((unused)) inline QUIC_URXE * ossl_list_urxe_head(const OSSL_LIST_urxe *list) { 
22208   # 155 "include/internal/quic_demux.h" 3 4
22209   ((void) (0))
22210   # 155 "include/internal/quic_demux.h"
22211   ; return list->alpha; } static __attribute__((unused)) inline QUIC_URXE * ossl_list_urxe_tail(const OSSL_LIST_urxe *list) { 
22212   # 155 "include/internal/quic_demux.h" 3 4
22213   ((void) (0))
22214   # 155 "include/internal/quic_demux.h"
22215   ; return list->omega; } static __attribute__((unused)) inline QUIC_URXE * ossl_list_urxe_next(const QUIC_URXE *elem) { 
22216   # 155 "include/internal/quic_demux.h" 3 4
22217   ((void) (0))
22218   # 155 "include/internal/quic_demux.h"
22219   ; return elem->ossl_list_urxe.next; } static __attribute__((unused)) inline QUIC_URXE * ossl_list_urxe_prev(const QUIC_URXE *elem) { 
22220   # 155 "include/internal/quic_demux.h" 3 4
22221   ((void) (0))
22222   # 155 "include/internal/quic_demux.h"
22223   ; return elem->ossl_list_urxe.prev; } static __attribute__((unused)) inline void ossl_list_urxe_remove(OSSL_LIST_urxe *list, QUIC_URXE *elem) { 
22224   # 155 "include/internal/quic_demux.h" 3 4
22225   ((void) (0))
22226   # 155 "include/internal/quic_demux.h"
22227   ; if (list->alpha == elem) list->alpha = elem->ossl_list_urxe.next; if (list->omega == elem) list->omega = elem->ossl_list_urxe.prev; if (elem->ossl_list_urxe.prev != 
22228   # 155 "include/internal/quic_demux.h" 3 4
22229   ((void *)0)
22230   # 155 "include/internal/quic_demux.h"
22231   ) elem->ossl_list_urxe.prev->ossl_list_urxe.next = elem->ossl_list_urxe.next; if (elem->ossl_list_urxe.next != 
22232   # 155 "include/internal/quic_demux.h" 3 4
22233   ((void *)0)
22234   # 155 "include/internal/quic_demux.h"
22235   ) elem->ossl_list_urxe.next->ossl_list_urxe.prev = elem->ossl_list_urxe.prev; list->num_elems--; memset(&elem->ossl_list_urxe, 0, sizeof(elem->ossl_list_urxe)); } static __attribute__((unused)) inline void ossl_list_urxe_insert_head(OSSL_LIST_urxe *list, QUIC_URXE *elem) { 
22236   # 155 "include/internal/quic_demux.h" 3 4
22237   ((void) (0))
22238   # 155 "include/internal/quic_demux.h"
22239   ; if (list->alpha != 
22240   # 155 "include/internal/quic_demux.h" 3 4
22241   ((void *)0)
22242   # 155 "include/internal/quic_demux.h"
22243   ) list->alpha->ossl_list_urxe.prev = elem; elem->ossl_list_urxe.next = list->alpha; elem->ossl_list_urxe.prev = 
22244   # 155 "include/internal/quic_demux.h" 3 4
22245   ((void *)0)
22246   # 155 "include/internal/quic_demux.h"
22247   ; list->alpha = elem; if (list->omega == 
22248   # 155 "include/internal/quic_demux.h" 3 4
22249   ((void *)0)
22250   # 155 "include/internal/quic_demux.h"
22251   ) list->omega = elem; list->num_elems++; } static __attribute__((unused)) inline void ossl_list_urxe_insert_tail(OSSL_LIST_urxe *list, QUIC_URXE *elem) { 
22252   # 155 "include/internal/quic_demux.h" 3 4
22253   ((void) (0))
22254   # 155 "include/internal/quic_demux.h"
22255   ; if (list->omega != 
22256   # 155 "include/internal/quic_demux.h" 3 4
22257   ((void *)0)
22258   # 155 "include/internal/quic_demux.h"
22259   ) list->omega->ossl_list_urxe.next = elem; elem->ossl_list_urxe.prev = list->omega; elem->ossl_list_urxe.next = 
22260   # 155 "include/internal/quic_demux.h" 3 4
22261   ((void *)0)
22262   # 155 "include/internal/quic_demux.h"
22263   ; list->omega = elem; if (list->alpha == 
22264   # 155 "include/internal/quic_demux.h" 3 4
22265   ((void *)0)
22266   # 155 "include/internal/quic_demux.h"
22267   ) list->alpha = elem; list->num_elems++; } static __attribute__((unused)) inline void ossl_list_urxe_insert_before(OSSL_LIST_urxe *list, QUIC_URXE *e, QUIC_URXE *elem) { 
22268   # 155 "include/internal/quic_demux.h" 3 4
22269   ((void) (0))
22270   # 155 "include/internal/quic_demux.h"
22271   ; elem->ossl_list_urxe.next = e; elem->ossl_list_urxe.prev = e->ossl_list_urxe.prev; if (e->ossl_list_urxe.prev != 
22272   # 155 "include/internal/quic_demux.h" 3 4
22273   ((void *)0)
22274   # 155 "include/internal/quic_demux.h"
22275   ) e->ossl_list_urxe.prev->ossl_list_urxe.next = elem; e->ossl_list_urxe.prev = elem; if (list->alpha == e) list->alpha = elem; list->num_elems++; } static __attribute__((unused)) inline void ossl_list_urxe_insert_after(OSSL_LIST_urxe *list, QUIC_URXE *e, QUIC_URXE *elem) { 
22276   # 155 "include/internal/quic_demux.h" 3 4
22277   ((void) (0))
22278   # 155 "include/internal/quic_demux.h"
22279   ; elem->ossl_list_urxe.prev = e; elem->ossl_list_urxe.next = e->ossl_list_urxe.next; if (e->ossl_list_urxe.next != 
22280   # 155 "include/internal/quic_demux.h" 3 4
22281   ((void *)0)
22282   # 155 "include/internal/quic_demux.h"
22283   ) e->ossl_list_urxe.next->ossl_list_urxe.prev = elem; e->ossl_list_urxe.next = elem; if (list->omega == e) list->omega = elem; list->num_elems++; } struct ossl_list_st_urxe;
22284   typedef OSSL_LIST_urxe QUIC_URXE_LIST;
22285   
22286   
22287   
22288   
22289   
22290   void ossl_quic_urxe_remove(QUIC_URXE_LIST *l, QUIC_URXE *e);
22291   void ossl_quic_urxe_insert_head(QUIC_URXE_LIST *l, QUIC_URXE *e);
22292   void ossl_quic_urxe_insert_tail(QUIC_URXE_LIST *l, QUIC_URXE *e);
22293   # 183 "include/internal/quic_demux.h"
22294   typedef void (ossl_quic_demux_cb_fn)(QUIC_URXE *e, void *arg,
22295                                        const QUIC_CONN_ID *dcid);
22296   # 198 "include/internal/quic_demux.h"
22297   QUIC_DEMUX *ossl_quic_demux_new(BIO *net_bio,
22298                                   size_t short_conn_id_len,
22299                                   OSSL_TIME (*now)(void *arg),
22300                                   void *now_arg);
22301   
22302   
22303   
22304   
22305   
22306   void ossl_quic_demux_free(QUIC_DEMUX *demux);
22307   
22308   
22309   
22310   
22311   
22312   void ossl_quic_demux_set_bio(QUIC_DEMUX *demux, BIO *net_bio);
22313   
22314   
22315   
22316   
22317   int ossl_quic_demux_set_mtu(QUIC_DEMUX *demux, unsigned int mtu);
22318   # 230 "include/internal/quic_demux.h"
22319   void ossl_quic_demux_set_default_handler(QUIC_DEMUX *demux,
22320                                            ossl_quic_demux_cb_fn *cb,
22321                                            void *cb_arg);
22322   
22323   
22324   
22325   
22326   
22327   
22328   void ossl_quic_demux_release_urxe(QUIC_DEMUX *demux,
22329                                     QUIC_URXE *e);
22330   # 253 "include/internal/quic_demux.h"
22331   void ossl_quic_demux_reinject_urxe(QUIC_DEMUX *demux,
22332                                      QUIC_URXE *e);
22333   # 280 "include/internal/quic_demux.h"
22334   int ossl_quic_demux_pump(QUIC_DEMUX *demux);
22335   # 291 "include/internal/quic_demux.h"
22336   int ossl_quic_demux_inject(QUIC_DEMUX *demux,
22337                              const unsigned char *buf,
22338                              size_t buf_len,
22339                              const BIO_ADDR *peer,
22340                              const BIO_ADDR *local);
22341   
22342   
22343   
22344   
22345   int ossl_quic_demux_has_pending(const QUIC_DEMUX *demux);
22346   # 19 "include/internal/quic_record_rx.h" 2
22347   
22348   
22349   
22350   
22351   
22352   
22353   
22354   typedef struct ossl_qrx_st OSSL_QRX;
22355   
22356   typedef struct ossl_qrx_args_st {
22357       OSSL_LIB_CTX *libctx;
22358       const char *propq;
22359   
22360   
22361       QUIC_DEMUX *demux;
22362   
22363   
22364       size_t short_conn_id_len;
22365   
22366   
22367   
22368   
22369   
22370       size_t max_deferred;
22371   
22372   
22373       QUIC_PN init_largest_pn[QUIC_PN_SPACE_NUM];
22374   
22375   
22376       unsigned char init_key_phase_bit;
22377   } OSSL_QRX_ARGS;
22378   
22379   
22380   OSSL_QRX *ossl_qrx_new(const OSSL_QRX_ARGS *args);
22381   # 62 "include/internal/quic_record_rx.h"
22382   void ossl_qrx_free(OSSL_QRX *qrx);
22383   
22384   
22385   void ossl_qrx_set_msg_callback(OSSL_QRX *qrx, ossl_msg_cb msg_callback,
22386                                  SSL *msg_callback_ssl);
22387   void ossl_qrx_set_msg_callback_arg(OSSL_QRX *qrx,
22388                                      void *msg_callback_arg);
22389   # 159 "include/internal/quic_record_rx.h"
22390   int ossl_qrx_provide_secret(OSSL_QRX *qrx,
22391                               uint32_t enc_level,
22392                               uint32_t suite_id,
22393                               EVP_MD *md,
22394                               const unsigned char *secret,
22395                               size_t secret_len);
22396   # 174 "include/internal/quic_record_rx.h"
22397   int ossl_qrx_discard_enc_level(OSSL_QRX *qrx, uint32_t enc_level);
22398   
22399   
22400   
22401   
22402   
22403   
22404   
22405   struct ossl_qrx_pkt_st {
22406   
22407   
22408   
22409   
22410   
22411       QUIC_PKT_HDR *hdr;
22412   
22413   
22414   
22415   
22416   
22417   
22418       const BIO_ADDR *peer;
22419   
22420   
22421   
22422   
22423   
22424       const BIO_ADDR *local;
22425   
22426   
22427   
22428   
22429   
22430   
22431   
22432       size_t datagram_len;
22433   
22434   
22435       QUIC_PN pn;
22436   
22437   
22438   
22439   
22440   
22441       OSSL_TIME time;
22442   
22443   
22444       OSSL_QRX *qrx;
22445   
22446   
22447   
22448   
22449   
22450       uint64_t key_epoch;
22451   
22452   
22453   
22454   
22455   
22456       uint64_t datagram_id;
22457   };
22458   # 250 "include/internal/quic_record_rx.h"
22459   int ossl_qrx_read_pkt(OSSL_QRX *qrx, OSSL_QRX_PKT **pkt);
22460   
22461   
22462   
22463   
22464   
22465   void ossl_qrx_pkt_release(OSSL_QRX_PKT *pkt);
22466   
22467   
22468   void ossl_qrx_pkt_up_ref(OSSL_QRX_PKT *pkt);
22469   
22470   
22471   
22472   
22473   
22474   int ossl_qrx_processed_read_pending(OSSL_QRX *qrx);
22475   # 274 "include/internal/quic_record_rx.h"
22476   int ossl_qrx_unprocessed_read_pending(OSSL_QRX *qrx);
22477   # 288 "include/internal/quic_record_rx.h"
22478   uint64_t ossl_qrx_get_bytes_received(OSSL_QRX *qrx, int clear);
22479   # 304 "include/internal/quic_record_rx.h"
22480   typedef int (ossl_qrx_late_validation_cb)(QUIC_PN pn, int pn_space,
22481                                             void *arg);
22482   
22483   int ossl_qrx_set_late_validation_cb(OSSL_QRX *qrx,
22484                                       ossl_qrx_late_validation_cb *cb,
22485                                       void *cb_arg);
22486   # 318 "include/internal/quic_record_rx.h"
22487   void ossl_qrx_inject_urxe(OSSL_QRX *qrx, QUIC_URXE *e);
22488   # 329 "include/internal/quic_record_rx.h"
22489   void ossl_qrx_allow_1rtt_processing(OSSL_QRX *qrx);
22490   # 484 "include/internal/quic_record_rx.h"
22491   uint64_t ossl_qrx_get_key_epoch(OSSL_QRX *qrx);
22492   # 494 "include/internal/quic_record_rx.h"
22493   typedef void (ossl_qrx_key_update_cb)(QUIC_PN pn, void *arg);
22494   
22495   int ossl_qrx_set_key_update_cb(OSSL_QRX *qrx,
22496                                  ossl_qrx_key_update_cb *cb, void *cb_arg);
22497   # 517 "include/internal/quic_record_rx.h"
22498   int ossl_qrx_key_update_timeout(OSSL_QRX *qrx, int normal);
22499   # 537 "include/internal/quic_record_rx.h"
22500   uint64_t ossl_qrx_get_cur_forged_pkt_count(OSSL_QRX *qrx);
22501   
22502   
22503   
22504   
22505   
22506   uint64_t ossl_qrx_get_max_forged_pkt_count(OSSL_QRX *qrx,
22507                                              uint32_t enc_level);
22508   # 16 "include/internal/quic_ssl.h" 2
22509   # 1 "include/internal/quic_ackm.h" 1
22510   # 12 "include/internal/quic_ackm.h"
22511   # 1 "include/internal/quic_statm.h" 1
22512   # 19 "include/internal/quic_statm.h"
22513   struct ossl_statm_st {
22514       OSSL_TIME smoothed_rtt, latest_rtt, min_rtt, rtt_variance;
22515       char have_first_sample;
22516   };
22517   
22518   typedef struct ossl_rtt_info_st {
22519   
22520       OSSL_TIME smoothed_rtt, latest_rtt, rtt_variance, min_rtt;
22521   } OSSL_RTT_INFO;
22522   
22523   int ossl_statm_init(OSSL_STATM *statm);
22524   
22525   void ossl_statm_destroy(OSSL_STATM *statm);
22526   
22527   void ossl_statm_get_rtt_info(OSSL_STATM *statm, OSSL_RTT_INFO *rtt_info);
22528   
22529   void ossl_statm_update_rtt(OSSL_STATM *statm,
22530                              OSSL_TIME ack_delay,
22531                              OSSL_TIME override_latest_rtt);
22532   # 13 "include/internal/quic_ackm.h" 2
22533   # 1 "include/internal/quic_cc.h" 1
22534   # 18 "include/internal/quic_cc.h"
22535   typedef struct ossl_cc_ack_info_st {
22536   
22537       OSSL_TIME tx_time;
22538   
22539   
22540       size_t tx_size;
22541   } OSSL_CC_ACK_INFO;
22542   
22543   typedef struct ossl_cc_loss_info_st {
22544   
22545       OSSL_TIME tx_time;
22546   
22547   
22548       size_t tx_size;
22549   } OSSL_CC_LOSS_INFO;
22550   
22551   typedef struct ossl_cc_ecn_info_st {
22552   
22553   
22554   
22555   
22556       OSSL_TIME largest_acked_time;
22557   } OSSL_CC_ECN_INFO;
22558   # 82 "include/internal/quic_cc.h"
22559   struct ossl_cc_method_st {
22560   
22561   
22562   
22563       OSSL_CC_DATA *(*new)(OSSL_TIME (*now_cb)(void *arg),
22564                            void *now_cb_arg);
22565   
22566       void (*free)(OSSL_CC_DATA *ccdata);
22567   
22568   
22569   
22570   
22571       void (*reset)(OSSL_CC_DATA *ccdata);
22572   # 103 "include/internal/quic_cc.h"
22573       int (*set_input_params)(OSSL_CC_DATA *ccdata,
22574                               const OSSL_PARAM *params);
22575   # 120 "include/internal/quic_cc.h"
22576       int (*bind_diagnostics)(OSSL_CC_DATA *ccdata,
22577                               OSSL_PARAM *params);
22578   # 132 "include/internal/quic_cc.h"
22579       int (*unbind_diagnostics)(OSSL_CC_DATA *ccdata,
22580                                 OSSL_PARAM *params);
22581   
22582   
22583   
22584   
22585   
22586   
22587   
22588       uint64_t (*get_tx_allowance)(OSSL_CC_DATA *ccdata);
22589   
22590   
22591   
22592   
22593   
22594   
22595   
22596       OSSL_TIME (*get_wakeup_deadline)(OSSL_CC_DATA *ccdata);
22597   
22598   
22599   
22600   
22601   
22602   
22603       int (*on_data_sent)(OSSL_CC_DATA *ccdata,
22604                           uint64_t num_bytes);
22605   
22606   
22607   
22608   
22609   
22610       int (*on_data_acked)(OSSL_CC_DATA *ccdata,
22611                            const OSSL_CC_ACK_INFO *info);
22612   # 179 "include/internal/quic_cc.h"
22613       int (*on_data_lost)(OSSL_CC_DATA *ccdata,
22614                           const OSSL_CC_LOSS_INFO *info);
22615   
22616   
22617   
22618   
22619   
22620   
22621   
22622       int (*on_data_lost_finished)(OSSL_CC_DATA *ccdata, uint32_t flags);
22623   
22624   
22625   
22626   
22627   
22628   
22629       int (*on_data_invalidated)(OSSL_CC_DATA *ccdata,
22630                                  uint64_t num_bytes);
22631   # 209 "include/internal/quic_cc.h"
22632       int (*on_ecn)(OSSL_CC_DATA *ccdata,
22633                     const OSSL_CC_ECN_INFO *info);
22634   };
22635   
22636   extern const OSSL_CC_METHOD ossl_cc_dummy_method;
22637   extern const OSSL_CC_METHOD ossl_cc_newreno_method;
22638   # 14 "include/internal/quic_ackm.h" 2
22639   
22640   # 1 "include/internal/quic_wire.h" 1
22641   # 12 "include/internal/quic_wire.h"
22642           
22643   # 90 "include/internal/quic_wire.h"
22644   const char *ossl_quic_frame_type_to_string(uint64_t frame_type);
22645   
22646   static __attribute__((unused)) inline int
22647   ossl_quic_frame_type_is_ack_eliciting(uint64_t frame_type)
22648   {
22649       switch (frame_type) {
22650       case 0x00:
22651       case 0x02:
22652       case 0x03:
22653       case 0x1C:
22654       case 0x1D:
22655           return 0;
22656       default:
22657           return 1;
22658       }
22659   }
22660   # 132 "include/internal/quic_wire.h"
22661   typedef struct ossl_quic_ack_range_st {
22662   
22663   
22664   
22665   
22666       QUIC_PN start, end;
22667   } OSSL_QUIC_ACK_RANGE;
22668   
22669   typedef struct ossl_quic_frame_ack_st {
22670   # 156 "include/internal/quic_wire.h"
22671       OSSL_QUIC_ACK_RANGE *ack_ranges;
22672       size_t num_ack_ranges;
22673   
22674       OSSL_TIME delay_time;
22675       uint64_t ect0, ect1, ecnce;
22676       unsigned int ecn_present : 1;
22677   } OSSL_QUIC_FRAME_ACK;
22678   
22679   
22680   int ossl_quic_frame_ack_contains_pn(const OSSL_QUIC_FRAME_ACK *ack, QUIC_PN pn);
22681   
22682   
22683   typedef struct ossl_quic_frame_stream_st {
22684       uint64_t stream_id;
22685       uint64_t offset;
22686       uint64_t len;
22687       const unsigned char *data;
22688   # 183 "include/internal/quic_wire.h"
22689       unsigned int has_explicit_len : 1;
22690   
22691   
22692       unsigned int is_fin : 1;
22693   } OSSL_QUIC_FRAME_STREAM;
22694   
22695   
22696   typedef struct ossl_quic_frame_crypto_st {
22697       uint64_t offset;
22698       uint64_t len;
22699       const unsigned char *data;
22700   } OSSL_QUIC_FRAME_CRYPTO;
22701   
22702   
22703   typedef struct ossl_quic_frame_reset_stream_st {
22704       uint64_t stream_id;
22705       uint64_t app_error_code;
22706       uint64_t final_size;
22707   } OSSL_QUIC_FRAME_RESET_STREAM;
22708   
22709   
22710   typedef struct ossl_quic_frame_stop_sending_st {
22711       uint64_t stream_id;
22712       uint64_t app_error_code;
22713   } OSSL_QUIC_FRAME_STOP_SENDING;
22714   
22715   
22716   typedef struct ossl_quic_frame_new_conn_id_st {
22717       uint64_t seq_num;
22718       uint64_t retire_prior_to;
22719       QUIC_CONN_ID conn_id;
22720       QUIC_STATELESS_RESET_TOKEN stateless_reset;
22721   } OSSL_QUIC_FRAME_NEW_CONN_ID;
22722   
22723   
22724   typedef struct ossl_quic_frame_conn_close_st {
22725       unsigned int is_app : 1;
22726       uint64_t error_code;
22727       uint64_t frame_type;
22728       char *reason;
22729       size_t reason_len;
22730   } OSSL_QUIC_FRAME_CONN_CLOSE;
22731   # 238 "include/internal/quic_wire.h"
22732   int ossl_quic_wire_encode_padding(WPACKET *pkt, size_t num_bytes);
22733   
22734   
22735   
22736   
22737   
22738   int ossl_quic_wire_encode_frame_ping(WPACKET *pkt);
22739   # 260 "include/internal/quic_wire.h"
22740   int ossl_quic_wire_encode_frame_ack(WPACKET *pkt,
22741                                       uint32_t ack_delay_exponent,
22742                                       const OSSL_QUIC_FRAME_ACK *ack);
22743   
22744   
22745   
22746   
22747   
22748   int ossl_quic_wire_encode_frame_reset_stream(WPACKET *pkt,
22749                                                const OSSL_QUIC_FRAME_RESET_STREAM *f);
22750   
22751   
22752   
22753   
22754   
22755   int ossl_quic_wire_encode_frame_stop_sending(WPACKET *pkt,
22756                                                const OSSL_QUIC_FRAME_STOP_SENDING *f);
22757   
22758   
22759   
22760   
22761   
22762   
22763   
22764   int ossl_quic_wire_encode_frame_crypto_hdr(WPACKET *hdr,
22765                                              const OSSL_QUIC_FRAME_CRYPTO *f);
22766   
22767   
22768   
22769   
22770   
22771   
22772   size_t ossl_quic_wire_get_encoded_frame_len_crypto_hdr(const OSSL_QUIC_FRAME_CRYPTO *f);
22773   # 302 "include/internal/quic_wire.h"
22774   void *ossl_quic_wire_encode_frame_crypto(WPACKET *pkt,
22775                                            const OSSL_QUIC_FRAME_CRYPTO *f);
22776   
22777   
22778   
22779   
22780   int ossl_quic_wire_encode_frame_new_token(WPACKET *pkt,
22781                                             const unsigned char *token,
22782                                             size_t token_len);
22783   # 327 "include/internal/quic_wire.h"
22784   int ossl_quic_wire_encode_frame_stream_hdr(WPACKET *pkt,
22785                                              const OSSL_QUIC_FRAME_STREAM *f);
22786   
22787   
22788   
22789   
22790   
22791   
22792   size_t ossl_quic_wire_get_encoded_frame_len_stream_hdr(const OSSL_QUIC_FRAME_STREAM *f);
22793   # 347 "include/internal/quic_wire.h"
22794   void *ossl_quic_wire_encode_frame_stream(WPACKET *pkt,
22795                                            const OSSL_QUIC_FRAME_STREAM *f);
22796   
22797   
22798   
22799   
22800   int ossl_quic_wire_encode_frame_max_data(WPACKET *pkt,
22801                                            uint64_t max_data);
22802   
22803   
22804   
22805   
22806   int ossl_quic_wire_encode_frame_max_stream_data(WPACKET *pkt,
22807                                                   uint64_t stream_id,
22808                                                   uint64_t max_data);
22809   # 370 "include/internal/quic_wire.h"
22810   int ossl_quic_wire_encode_frame_max_streams(WPACKET *pkt,
22811                                               char is_uni,
22812                                               uint64_t max_streams);
22813   
22814   
22815   
22816   
22817   int ossl_quic_wire_encode_frame_data_blocked(WPACKET *pkt,
22818                                                uint64_t max_data);
22819   
22820   
22821   
22822   
22823   int ossl_quic_wire_encode_frame_stream_data_blocked(WPACKET *pkt,
22824                                                       uint64_t stream_id,
22825                                                       uint64_t max_stream_data);
22826   
22827   
22828   
22829   
22830   
22831   
22832   
22833   int ossl_quic_wire_encode_frame_streams_blocked(WPACKET *pkt,
22834                                                   char is_uni,
22835                                                   uint64_t max_streams);
22836   # 404 "include/internal/quic_wire.h"
22837   int ossl_quic_wire_encode_frame_new_conn_id(WPACKET *pkt,
22838                                               const OSSL_QUIC_FRAME_NEW_CONN_ID *f);
22839   
22840   
22841   
22842   
22843   int ossl_quic_wire_encode_frame_retire_conn_id(WPACKET *pkt,
22844                                                  uint64_t seq_num);
22845   
22846   
22847   
22848   
22849   int ossl_quic_wire_encode_frame_path_challenge(WPACKET *pkt,
22850                                                  uint64_t data);
22851   
22852   
22853   
22854   
22855   int ossl_quic_wire_encode_frame_path_response(WPACKET *pkt,
22856                                                 uint64_t data);
22857   # 434 "include/internal/quic_wire.h"
22858   int ossl_quic_wire_encode_frame_conn_close(WPACKET *pkt,
22859                                              const OSSL_QUIC_FRAME_CONN_CLOSE *f);
22860   
22861   
22862   
22863   
22864   
22865   int ossl_quic_wire_encode_frame_handshake_done(WPACKET *pkt);
22866   # 453 "include/internal/quic_wire.h"
22867   unsigned char *ossl_quic_wire_encode_transport_param_bytes(WPACKET *pkt,
22868                                                              uint64_t id,
22869                                                              const unsigned char *value,
22870                                                              size_t value_len);
22871   
22872   
22873   
22874   
22875   
22876   int ossl_quic_wire_encode_transport_param_int(WPACKET *pkt,
22877                                                 uint64_t id,
22878                                                 uint64_t value);
22879   
22880   
22881   
22882   
22883   
22884   int ossl_quic_wire_encode_transport_param_cid(WPACKET *wpkt,
22885                                                 uint64_t id,
22886                                                 const QUIC_CONN_ID *cid);
22887   # 498 "include/internal/quic_wire.h"
22888   int ossl_quic_wire_peek_frame_header(PACKET *pkt, uint64_t *type,
22889                                        int *was_minimal);
22890   
22891   
22892   
22893   
22894   
22895   int ossl_quic_wire_skip_frame_header(PACKET *pkt, uint64_t *type);
22896   # 515 "include/internal/quic_wire.h"
22897   int ossl_quic_wire_peek_frame_ack_num_ranges(const PACKET *pkt,
22898                                                uint64_t *total_ranges);
22899   # 545 "include/internal/quic_wire.h"
22900   int ossl_quic_wire_decode_frame_ack(PACKET *pkt,
22901                                       uint32_t ack_delay_exponent,
22902                                       OSSL_QUIC_FRAME_ACK *ack,
22903                                       uint64_t *total_ranges);
22904   
22905   
22906   
22907   
22908   int ossl_quic_wire_decode_frame_reset_stream(PACKET *pkt,
22909                                                OSSL_QUIC_FRAME_RESET_STREAM *f);
22910   
22911   
22912   
22913   
22914   int ossl_quic_wire_decode_frame_stop_sending(PACKET *pkt,
22915                                                OSSL_QUIC_FRAME_STOP_SENDING *f);
22916   # 570 "include/internal/quic_wire.h"
22917   int ossl_quic_wire_decode_frame_crypto(PACKET *pkt, int nodata,
22918                                          OSSL_QUIC_FRAME_CRYPTO *f);
22919   
22920   
22921   
22922   
22923   
22924   int ossl_quic_wire_decode_frame_new_token(PACKET *pkt,
22925                                             const unsigned char **token,
22926                                             size_t *token_len);
22927   # 610 "include/internal/quic_wire.h"
22928   int ossl_quic_wire_decode_frame_stream(PACKET *pkt, int nodata,
22929                                          OSSL_QUIC_FRAME_STREAM *f);
22930   
22931   
22932   
22933   
22934   
22935   int ossl_quic_wire_decode_frame_max_data(PACKET *pkt,
22936                                            uint64_t *max_data);
22937   
22938   
22939   
22940   
22941   
22942   int ossl_quic_wire_decode_frame_max_stream_data(PACKET *pkt,
22943                                                   uint64_t *stream_id,
22944                                             uint64_t *max_stream_data);
22945   # 635 "include/internal/quic_wire.h"
22946   int ossl_quic_wire_decode_frame_max_streams(PACKET *pkt,
22947                                               uint64_t *max_streams);
22948   
22949   
22950   
22951   
22952   
22953   int ossl_quic_wire_decode_frame_data_blocked(PACKET *pkt,
22954                                                uint64_t *max_data);
22955   
22956   
22957   
22958   
22959   
22960   int ossl_quic_wire_decode_frame_stream_data_blocked(PACKET *pkt,
22961                                                       uint64_t *stream_id,
22962                                                       uint64_t *max_stream_data);
22963   # 661 "include/internal/quic_wire.h"
22964   int ossl_quic_wire_decode_frame_streams_blocked(PACKET *pkt,
22965                                                   uint64_t *max_streams);
22966   # 674 "include/internal/quic_wire.h"
22967   int ossl_quic_wire_decode_frame_new_conn_id(PACKET *pkt,
22968                                               OSSL_QUIC_FRAME_NEW_CONN_ID *f);
22969   
22970   
22971   
22972   
22973   
22974   int ossl_quic_wire_decode_frame_retire_conn_id(PACKET *pkt,
22975                                                  uint64_t *seq_num);
22976   
22977   
22978   
22979   
22980   int ossl_quic_wire_decode_frame_path_challenge(PACKET *pkt,
22981                                                  uint64_t *data);
22982   
22983   
22984   
22985   
22986   int ossl_quic_wire_decode_frame_path_response(PACKET *pkt,
22987                                                 uint64_t *data);
22988   # 709 "include/internal/quic_wire.h"
22989   int ossl_quic_wire_decode_frame_conn_close(PACKET *pkt,
22990                                              OSSL_QUIC_FRAME_CONN_CLOSE *f);
22991   
22992   
22993   
22994   
22995   
22996   
22997   size_t ossl_quic_wire_decode_padding(PACKET *pkt);
22998   
22999   
23000   
23001   
23002   int ossl_quic_wire_decode_frame_ping(PACKET *pkt);
23003   
23004   
23005   
23006   
23007   int ossl_quic_wire_decode_frame_handshake_done(PACKET *pkt);
23008   
23009   
23010   
23011   
23012   
23013   int ossl_quic_wire_peek_transport_param(PACKET *pkt, uint64_t *id);
23014   # 745 "include/internal/quic_wire.h"
23015   const unsigned char *ossl_quic_wire_decode_transport_param_bytes(PACKET *pkt,
23016                                                                    uint64_t *id,
23017                                                                    size_t *len);
23018   
23019   
23020   
23021   
23022   
23023   
23024   
23025   int ossl_quic_wire_decode_transport_param_int(PACKET *pkt,
23026                                                 uint64_t *id,
23027                                                 uint64_t *value);
23028   
23029   
23030   
23031   
23032   
23033   
23034   
23035   int ossl_quic_wire_decode_transport_param_cid(PACKET *pkt,
23036                                                 uint64_t *id,
23037                                                 QUIC_CONN_ID *cid);
23038   
23039   
23040   
23041   
23042   typedef struct quic_preferred_addr_st {
23043       uint16_t ipv4_port, ipv6_port;
23044       unsigned char ipv4[4], ipv6[16];
23045       QUIC_STATELESS_RESET_TOKEN stateless_reset;
23046       QUIC_CONN_ID cid;
23047   } QUIC_PREFERRED_ADDR;
23048   
23049   int ossl_quic_wire_decode_transport_param_preferred_addr(PACKET *pkt,
23050                                                            QUIC_PREFERRED_ADDR *p);
23051   # 16 "include/internal/quic_ackm.h" 2
23052   
23053   
23054   
23055   
23056   
23057   
23058   OSSL_ACKM *ossl_ackm_new(OSSL_TIME (*now)(void *arg),
23059                            void *now_arg,
23060                            OSSL_STATM *statm,
23061                            const OSSL_CC_METHOD *cc_method,
23062                            OSSL_CC_DATA *cc_data);
23063   void ossl_ackm_free(OSSL_ACKM *ackm);
23064   
23065   void ossl_ackm_set_loss_detection_deadline_callback(OSSL_ACKM *ackm,
23066                                                       void (*fn)(OSSL_TIME deadline,
23067                                                                  void *arg),
23068                                                       void *arg);
23069   
23070   void ossl_ackm_set_ack_deadline_callback(OSSL_ACKM *ackm,
23071                                            void (*fn)(OSSL_TIME deadline,
23072                                                       int pkt_space,
23073                                                       void *arg),
23074                                            void *arg);
23075   
23076   
23077   
23078   
23079   
23080   
23081   
23082   void ossl_ackm_set_rx_max_ack_delay(OSSL_ACKM *ackm, OSSL_TIME rx_max_ack_delay);
23083   # 55 "include/internal/quic_ackm.h"
23084   void ossl_ackm_set_tx_max_ack_delay(OSSL_ACKM *ackm, OSSL_TIME tx_max_ack_delay);
23085   
23086   typedef struct ossl_ackm_tx_pkt_st OSSL_ACKM_TX_PKT;
23087   struct ossl_ackm_tx_pkt_st {
23088   
23089       QUIC_PN pkt_num;
23090   
23091   
23092       size_t num_bytes;
23093   
23094   
23095       OSSL_TIME time;
23096   # 78 "include/internal/quic_ackm.h"
23097       QUIC_PN largest_acked;
23098   
23099   
23100   
23101   
23102   
23103       unsigned int pkt_space :2;
23104   # 93 "include/internal/quic_ackm.h"
23105       unsigned int is_inflight :1;
23106   
23107   
23108   
23109   
23110   
23111       unsigned int is_ack_eliciting :1;
23112   
23113   
23114       unsigned int is_pto_probe :1;
23115   
23116   
23117       unsigned int is_mtu_probe :1;
23118   
23119   
23120       void (*on_lost)(void *arg);
23121   
23122       void (*on_acked)(void *arg);
23123   
23124   
23125   
23126   
23127       void (*on_discarded)(void *arg);
23128       void *cb_arg;
23129   # 125 "include/internal/quic_ackm.h"
23130       struct { OSSL_ACKM_TX_PKT *next, *prev; } ossl_list_tx_history;
23131   
23132       struct ossl_ackm_tx_pkt_st *anext;
23133       struct ossl_ackm_tx_pkt_st *lnext;
23134   };
23135   
23136   int ossl_ackm_on_tx_packet(OSSL_ACKM *ackm, OSSL_ACKM_TX_PKT *pkt);
23137   int ossl_ackm_on_rx_datagram(OSSL_ACKM *ackm, size_t num_bytes);
23138   
23139   
23140   
23141   
23142   
23143   
23144   typedef struct ossl_ackm_rx_pkt_st {
23145   
23146       QUIC_PN pkt_num;
23147   
23148   
23149       OSSL_TIME time;
23150   
23151   
23152   
23153   
23154   
23155       unsigned int pkt_space :2;
23156   
23157   
23158       unsigned int is_ack_eliciting :1;
23159   
23160   
23161   
23162   
23163   
23164       unsigned int ecn :2;
23165   } OSSL_ACKM_RX_PKT;
23166   
23167   int ossl_ackm_on_rx_packet(OSSL_ACKM *ackm, const OSSL_ACKM_RX_PKT *pkt);
23168   
23169   int ossl_ackm_on_rx_ack_frame(OSSL_ACKM *ackm, const OSSL_QUIC_FRAME_ACK *ack,
23170                                 int pkt_space, OSSL_TIME rx_time);
23171   # 174 "include/internal/quic_ackm.h"
23172   int ossl_ackm_on_pkt_space_discarded(OSSL_ACKM *ackm, int pkt_space);
23173   
23174   int ossl_ackm_on_handshake_confirmed(OSSL_ACKM *ackm);
23175   int ossl_ackm_on_timeout(OSSL_ACKM *ackm);
23176   
23177   OSSL_TIME ossl_ackm_get_loss_detection_deadline(OSSL_ACKM *ackm);
23178   # 188 "include/internal/quic_ackm.h"
23179   const OSSL_QUIC_FRAME_ACK *ossl_ackm_get_ack_frame(OSSL_ACKM *ackm,
23180                                                      int pkt_space);
23181   
23182   
23183   
23184   
23185   
23186   
23187   
23188   OSSL_TIME ossl_ackm_get_ack_deadline(OSSL_ACKM *ackm, int pkt_space);
23189   # 209 "include/internal/quic_ackm.h"
23190   int ossl_ackm_is_ack_desired(OSSL_ACKM *ackm, int pkt_space);
23191   # 230 "include/internal/quic_ackm.h"
23192   int ossl_ackm_is_rx_pn_processable(OSSL_ACKM *ackm, QUIC_PN pn, int pkt_space);
23193   
23194   typedef struct ossl_ackm_probe_info_st {
23195   # 243 "include/internal/quic_ackm.h"
23196       uint32_t anti_deadlock_initial, anti_deadlock_handshake;
23197   # 252 "include/internal/quic_ackm.h"
23198       uint32_t pto[QUIC_PN_SPACE_NUM];
23199   } OSSL_ACKM_PROBE_INFO;
23200   # 269 "include/internal/quic_ackm.h"
23201   OSSL_ACKM_PROBE_INFO *ossl_ackm_get0_probe_request(OSSL_ACKM *ackm);
23202   
23203   int ossl_ackm_get_largest_unacked(OSSL_ACKM *ackm, int pkt_space, QUIC_PN *pn);
23204   # 282 "include/internal/quic_ackm.h"
23205   int ossl_ackm_mark_packet_pseudo_lost(OSSL_ACKM *ackm,
23206                                         int pkt_space, QUIC_PN pn);
23207   
23208   
23209   
23210   
23211   
23212   OSSL_TIME ossl_ackm_get_pto_duration(OSSL_ACKM *ackm);
23213   
23214   
23215   QUIC_PN ossl_ackm_get_largest_acked(OSSL_ACKM *ackm, int pkt_space);
23216   # 17 "include/internal/quic_ssl.h" 2
23217   # 1 "include/internal/quic_channel.h" 1
23218   # 15 "include/internal/quic_channel.h"
23219   # 1 "include/internal/quic_record_tx.h" 1
23220   # 18 "include/internal/quic_record_tx.h"
23221   # 1 "include/internal/qlog.h" 1
23222   # 17 "include/internal/qlog.h"
23223   typedef struct qlog_st QLOG;
23224   
23225   
23226   
23227   enum {
23228       QLOG_EVENT_TYPE_NONE,
23229   
23230   
23231   # 1 "include/internal/qlog_events.h" 1
23232   # 9 "include/internal/qlog_events.h"
23233   QLOG_EVENT_TYPE_connectivity_connection_started,
23234   QLOG_EVENT_TYPE_connectivity_connection_state_updated,
23235   QLOG_EVENT_TYPE_connectivity_connection_closed,
23236   QLOG_EVENT_TYPE_transport_parameters_set,
23237   QLOG_EVENT_TYPE_transport_packet_sent,
23238   QLOG_EVENT_TYPE_transport_packet_received,
23239   QLOG_EVENT_TYPE_recovery_packet_lost,
23240   # 26 "include/internal/qlog.h" 2
23241   
23242   
23243       QLOG_EVENT_TYPE_NUM
23244   };
23245   
23246   typedef struct qlog_trace_info_st {
23247       QUIC_CONN_ID odcid;
23248       const char *title, *description, *group_id;
23249       int is_server;
23250       OSSL_TIME (*now_cb)(void *arg);
23251       void *now_cb_arg;
23252       uint64_t override_process_id;
23253       const char *override_impl_name;
23254   } QLOG_TRACE_INFO;
23255   
23256   QLOG *ossl_qlog_new(const QLOG_TRACE_INFO *info);
23257   QLOG *ossl_qlog_new_from_env(const QLOG_TRACE_INFO *info);
23258   
23259   void ossl_qlog_free(QLOG *qlog);
23260   
23261   
23262   int ossl_qlog_set_event_type_enabled(QLOG *qlog, uint32_t event_type,
23263                                        int enable);
23264   int ossl_qlog_set_filter(QLOG *qlog, const char *filter);
23265   
23266   int ossl_qlog_set_sink_bio(QLOG *qlog, BIO *bio);
23267   
23268   int ossl_qlog_set_sink_file(QLOG *qlog, FILE *file, int close_flag);
23269   
23270   int ossl_qlog_set_sink_filename(QLOG *qlog, const char *filename);
23271   
23272   
23273   int ossl_qlog_flush(QLOG *qlog);
23274   
23275   
23276   int ossl_qlog_enabled(QLOG *qlog, uint32_t event_type);
23277   
23278   
23279   int ossl_qlog_event_try_begin(QLOG *qlog, uint32_t event_type,
23280                                 const char *event_cat, const char *event_name,
23281                                 const char *event_combined_name);
23282   void ossl_qlog_event_end(QLOG *qlog);
23283   
23284   void ossl_qlog_group_begin(QLOG *qlog, const char *name);
23285   void ossl_qlog_group_end(QLOG *qlog);
23286   
23287   void ossl_qlog_array_begin(QLOG *qlog, const char *name);
23288   void ossl_qlog_array_end(QLOG *qlog);
23289   
23290   void ossl_qlog_override_time(QLOG *qlog, OSSL_TIME event_time);
23291   # 108 "include/internal/qlog.h"
23292   void ossl_qlog_str(QLOG *qlog, const char *name, const char *value);
23293   void ossl_qlog_str_len(QLOG *qlog, const char *name,
23294                          const char *value, size_t value_len);
23295   void ossl_qlog_u64(QLOG *qlog, const char *name, uint64_t value);
23296   void ossl_qlog_i64(QLOG *qlog, const char *name, int64_t value);
23297   void ossl_qlog_bool(QLOG *qlog, const char *name, int value);
23298   void ossl_qlog_bin(QLOG *qlog, const char *name,
23299                      const void *value, size_t value_len);
23300   # 19 "include/internal/quic_record_tx.h" 2
23301   
23302   
23303   
23304   
23305   
23306   
23307   
23308   typedef struct ossl_qtx_iovec_st {
23309       const unsigned char *buf;
23310       size_t buf_len;
23311   } OSSL_QTX_IOVEC;
23312   
23313   typedef struct ossl_qtx_st OSSL_QTX;
23314   
23315   typedef int (*ossl_mutate_packet_cb)(const QUIC_PKT_HDR *hdrin,
23316                                        const OSSL_QTX_IOVEC *iovecin, size_t numin,
23317                                        QUIC_PKT_HDR **hdrout,
23318                                        const OSSL_QTX_IOVEC **iovecout,
23319                                        size_t *numout,
23320                                        void *arg);
23321   
23322   typedef void (*ossl_finish_mutate_cb)(void *arg);
23323   
23324   typedef struct ossl_qtx_args_st {
23325       OSSL_LIB_CTX *libctx;
23326       const char *propq;
23327   
23328   
23329       BIO *bio;
23330   
23331   
23332       size_t mdpl;
23333   
23334   
23335       QLOG *(*get_qlog_cb)(void *arg);
23336       void *get_qlog_cb_arg;
23337   } OSSL_QTX_ARGS;
23338   
23339   
23340   OSSL_QTX *ossl_qtx_new(const OSSL_QTX_ARGS *args);
23341   
23342   
23343   void ossl_qtx_free(OSSL_QTX *qtx);
23344   
23345   
23346   void ossl_qtx_set_mutator(OSSL_QTX *qtx, ossl_mutate_packet_cb mutatecb,
23347                             ossl_finish_mutate_cb finishmutatecb, void *mutatearg);
23348   
23349   
23350   void ossl_qtx_set_msg_callback(OSSL_QTX *qtx, ossl_msg_cb msg_callback,
23351                                  SSL *msg_callback_ssl);
23352   void ossl_qtx_set_msg_callback_arg(OSSL_QTX *qtx, void *msg_callback_arg);
23353   
23354   
23355   void ossl_qtx_set_qlog_cb(OSSL_QTX *qtx, QLOG *(*get_qlog_cb)(void *arg),
23356                             void *get_qlog_cb_arg);
23357   # 114 "include/internal/quic_record_tx.h"
23358   int ossl_qtx_provide_secret(OSSL_QTX *qtx,
23359                               uint32_t enc_level,
23360                               uint32_t suite_id,
23361                               EVP_MD *md,
23362                               const unsigned char *secret,
23363                               size_t secret_len);
23364   # 128 "include/internal/quic_record_tx.h"
23365   int ossl_qtx_discard_enc_level(OSSL_QTX *qtx, uint32_t enc_level);
23366   
23367   
23368   int ossl_qtx_is_enc_level_provisioned(OSSL_QTX *qtx, uint32_t enc_level);
23369   
23370   
23371   
23372   
23373   
23374   
23375   
23376   int ossl_qtx_calculate_plaintext_payload_len(OSSL_QTX *qtx, uint32_t enc_level,
23377                                                size_t ciphertext_len,
23378                                                size_t *plaintext_len);
23379   
23380   
23381   
23382   
23383   
23384   
23385   
23386   int ossl_qtx_calculate_ciphertext_payload_len(OSSL_QTX *qtx, uint32_t enc_level,
23387                                                 size_t plaintext_len,
23388                                                 size_t *ciphertext_len);
23389   
23390   uint32_t ossl_qrl_get_suite_cipher_tag_len(uint32_t suite_id);
23391   
23392   
23393   
23394   
23395   
23396   
23397   
23398   struct ossl_qtx_pkt_st {
23399   
23400       QUIC_PKT_HDR *hdr;
23401   
23402   
23403   
23404   
23405   
23406       const OSSL_QTX_IOVEC *iovec;
23407       size_t num_iovec;
23408   
23409   
23410       const BIO_ADDR *peer;
23411   
23412   
23413   
23414   
23415   
23416       const BIO_ADDR *local;
23417   
23418   
23419   
23420   
23421   
23422       QUIC_PN pn;
23423   
23424   
23425       uint32_t flags;
23426   };
23427   # 238 "include/internal/quic_record_tx.h"
23428   int ossl_qtx_write_pkt(OSSL_QTX *qtx, const OSSL_QTX_PKT *pkt);
23429   
23430   
23431   
23432   
23433   
23434   void ossl_qtx_finish_dgram(OSSL_QTX *qtx);
23435   # 272 "include/internal/quic_record_tx.h"
23436   int ossl_qtx_flush_net(OSSL_QTX *qtx);
23437   
23438   
23439   
23440   
23441   
23442   
23443   int ossl_qtx_pop_net(OSSL_QTX *qtx, BIO_MSG *msg);
23444   
23445   
23446   size_t ossl_qtx_get_queue_len_datagrams(OSSL_QTX *qtx);
23447   
23448   
23449   
23450   
23451   
23452   size_t ossl_qtx_get_queue_len_bytes(OSSL_QTX *qtx);
23453   
23454   
23455   
23456   
23457   
23458   
23459   size_t ossl_qtx_get_cur_dgram_len_bytes(OSSL_QTX *qtx);
23460   
23461   
23462   
23463   
23464   
23465   size_t ossl_qtx_get_unflushed_pkt_count(OSSL_QTX *qtx);
23466   
23467   
23468   
23469   
23470   
23471   
23472   void ossl_qtx_set_bio(OSSL_QTX *qtx, BIO *bio);
23473   
23474   
23475   int ossl_qtx_set_mdpl(OSSL_QTX *qtx, size_t mdpl);
23476   
23477   
23478   size_t ossl_qtx_get_mdpl(OSSL_QTX *qtx);
23479   # 345 "include/internal/quic_record_tx.h"
23480   int ossl_qtx_trigger_key_update(OSSL_QTX *qtx);
23481   # 360 "include/internal/quic_record_tx.h"
23482   uint64_t ossl_qtx_get_cur_epoch_pkt_count(OSSL_QTX *qtx, uint32_t enc_level);
23483   # 383 "include/internal/quic_record_tx.h"
23484   uint64_t ossl_qtx_get_max_epoch_pkt_count(OSSL_QTX *qtx, uint32_t enc_level);
23485   
23486   
23487   
23488   
23489   
23490   uint64_t ossl_qtx_get_key_epoch(OSSL_QTX *qtx);
23491   # 16 "include/internal/quic_channel.h" 2
23492   
23493   
23494   
23495   
23496   # 1 "include/internal/thread.h" 1
23497   # 13 "include/internal/thread.h"
23498   # 1 "include/internal/thread_arch.h" 1
23499   # 40 "include/internal/thread_arch.h"
23500   typedef struct crypto_mutex_st CRYPTO_MUTEX;
23501   typedef struct crypto_condvar_st CRYPTO_CONDVAR;
23502   
23503   CRYPTO_MUTEX *ossl_crypto_mutex_new(void);
23504   void ossl_crypto_mutex_lock(CRYPTO_MUTEX *mutex);
23505   int ossl_crypto_mutex_try_lock(CRYPTO_MUTEX *mutex);
23506   void ossl_crypto_mutex_unlock(CRYPTO_MUTEX *mutex);
23507   void ossl_crypto_mutex_free(CRYPTO_MUTEX **mutex);
23508   
23509   CRYPTO_CONDVAR *ossl_crypto_condvar_new(void);
23510   void ossl_crypto_condvar_wait(CRYPTO_CONDVAR *cv, CRYPTO_MUTEX *mutex);
23511   void ossl_crypto_condvar_wait_timeout(CRYPTO_CONDVAR *cv, CRYPTO_MUTEX *mutex,
23512                                         OSSL_TIME deadline);
23513   void ossl_crypto_condvar_broadcast(CRYPTO_CONDVAR *cv);
23514   void ossl_crypto_condvar_signal(CRYPTO_CONDVAR *cv);
23515   void ossl_crypto_condvar_free(CRYPTO_CONDVAR **cv);
23516   
23517   typedef uint32_t CRYPTO_THREAD_RETVAL;
23518   typedef CRYPTO_THREAD_RETVAL (*CRYPTO_THREAD_ROUTINE)(void *);
23519   typedef CRYPTO_THREAD_RETVAL (*CRYPTO_THREAD_ROUTINE_CB)(void *,
23520                                                            void (**)(void *),
23521                                                            void **);
23522   # 71 "include/internal/thread_arch.h"
23523   typedef struct crypto_thread_st {
23524       uint32_t state;
23525       void *data;
23526       CRYPTO_THREAD_ROUTINE routine;
23527       CRYPTO_THREAD_RETVAL retval;
23528       void *handle;
23529       CRYPTO_MUTEX *lock;
23530       CRYPTO_MUTEX *statelock;
23531       CRYPTO_CONDVAR *condvar;
23532       unsigned long thread_id;
23533       int joinable;
23534       OSSL_LIB_CTX *ctx;
23535   } CRYPTO_THREAD;
23536   # 116 "include/internal/thread_arch.h"
23537   CRYPTO_THREAD * ossl_crypto_thread_native_start(CRYPTO_THREAD_ROUTINE routine,
23538                                              void *data, int joinable);
23539   int ossl_crypto_thread_native_spawn(CRYPTO_THREAD *thread);
23540   int ossl_crypto_thread_native_join(CRYPTO_THREAD *thread,
23541                                 CRYPTO_THREAD_RETVAL *retval);
23542   int ossl_crypto_thread_native_perform_join(CRYPTO_THREAD *thread,
23543                                              CRYPTO_THREAD_RETVAL *retval);
23544   int ossl_crypto_thread_native_exit(void);
23545   int ossl_crypto_thread_native_is_self(CRYPTO_THREAD *thread);
23546   int ossl_crypto_thread_native_clean(CRYPTO_THREAD *thread);
23547   # 14 "include/internal/thread.h" 2
23548   
23549   # 1 "include/openssl/types.h" 1
23550   # 16 "include/internal/thread.h" 2
23551   # 1 "include/internal/cryptlib.h" 1
23552   # 12 "include/internal/cryptlib.h"
23553           
23554   # 29 "include/internal/cryptlib.h"
23555   typedef struct ex_callback_st EX_CALLBACK;
23556   struct stack_st_EX_CALLBACK; typedef int (*sk_EX_CALLBACK_compfunc)(const EX_CALLBACK * const *a, const EX_CALLBACK *const *b); typedef void (*sk_EX_CALLBACK_freefunc)(EX_CALLBACK *a); typedef EX_CALLBACK * (*sk_EX_CALLBACK_copyfunc)(const EX_CALLBACK *a); static __attribute__((unused)) inline int sk_EX_CALLBACK_num(const struct stack_st_EX_CALLBACK *sk) { return OPENSSL_sk_num((const OPENSSL_STACK *)sk); } static __attribute__((unused)) inline EX_CALLBACK *sk_EX_CALLBACK_value(const struct stack_st_EX_CALLBACK *sk, int idx) { return (EX_CALLBACK *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx); } static __attribute__((unused)) inline struct stack_st_EX_CALLBACK *sk_EX_CALLBACK_new(sk_EX_CALLBACK_compfunc compare) { return (struct stack_st_EX_CALLBACK *)OPENSSL_sk_new((OPENSSL_sk_compfunc)compare); } static __attribute__((unused)) inline struct stack_st_EX_CALLBACK *sk_EX_CALLBACK_new_null(void) { return (struct stack_st_EX_CALLBACK *)OPENSSL_sk_new_null(); } static __attribute__((unused)) inline struct stack_st_EX_CALLBACK *sk_EX_CALLBACK_new_reserve(sk_EX_CALLBACK_compfunc compare, int n) { return (struct stack_st_EX_CALLBACK *)OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n); } static __attribute__((unused)) inline int sk_EX_CALLBACK_reserve(struct stack_st_EX_CALLBACK *sk, int n) { return OPENSSL_sk_reserve((OPENSSL_STACK *)sk, n); } static __attribute__((unused)) inline void sk_EX_CALLBACK_free(struct stack_st_EX_CALLBACK *sk) { OPENSSL_sk_free((OPENSSL_STACK *)sk); } static __attribute__((unused)) inline void sk_EX_CALLBACK_zero(struct stack_st_EX_CALLBACK *sk) { OPENSSL_sk_zero((OPENSSL_STACK *)sk); } static __attribute__((unused)) inline EX_CALLBACK *sk_EX_CALLBACK_delete(struct stack_st_EX_CALLBACK *sk, int i) { return (EX_CALLBACK *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i); } static __attribute__((unused)) inline EX_CALLBACK *sk_EX_CALLBACK_delete_ptr(struct stack_st_EX_CALLBACK *sk, EX_CALLBACK *ptr) { return (EX_CALLBACK *)OPENSSL_sk_delete_ptr((OPENSSL_STACK *)sk, (const void *)ptr); } static __attribute__((unused)) inline int sk_EX_CALLBACK_push(struct stack_st_EX_CALLBACK *sk, EX_CALLBACK *ptr) { return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr); } static __attribute__((unused)) inline int sk_EX_CALLBACK_unshift(struct stack_st_EX_CALLBACK *sk, EX_CALLBACK *ptr) { return OPENSSL_sk_unshift((OPENSSL_STACK *)sk, (const void *)ptr); } static __attribute__((unused)) inline EX_CALLBACK *sk_EX_CALLBACK_pop(struct stack_st_EX_CALLBACK *sk) { return (EX_CALLBACK *)OPENSSL_sk_pop((OPENSSL_STACK *)sk); } static __attribute__((unused)) inline EX_CALLBACK *sk_EX_CALLBACK_shift(struct stack_st_EX_CALLBACK *sk) { return (EX_CALLBACK *)OPENSSL_sk_shift((OPENSSL_STACK *)sk); } static __attribute__((unused)) inline void sk_EX_CALLBACK_pop_free(struct stack_st_EX_CALLBACK *sk, sk_EX_CALLBACK_freefunc freefunc) { OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); } static __attribute__((unused)) inline int sk_EX_CALLBACK_insert(struct stack_st_EX_CALLBACK *sk, EX_CALLBACK *ptr, int idx) { return OPENSSL_sk_insert((OPENSSL_STACK *)sk, (const void *)ptr, idx); } static __attribute__((unused)) inline EX_CALLBACK *sk_EX_CALLBACK_set(struct stack_st_EX_CALLBACK *sk, int idx, EX_CALLBACK *ptr) { return (EX_CALLBACK *)OPENSSL_sk_set((OPENSSL_STACK *)sk, idx, (const void *)ptr); } static __attribute__((unused)) inline int sk_EX_CALLBACK_find(struct stack_st_EX_CALLBACK *sk, EX_CALLBACK *ptr) { return OPENSSL_sk_find((OPENSSL_STACK *)sk, (const void *)ptr); } static __attribute__((unused)) inline int sk_EX_CALLBACK_find_ex(struct stack_st_EX_CALLBACK *sk, EX_CALLBACK *ptr) { return OPENSSL_sk_find_ex((OPENSSL_STACK *)sk, (const void *)ptr); } static __attribute__((unused)) inline int sk_EX_CALLBACK_find_all(struct stack_st_EX_CALLBACK *sk, EX_CALLBACK *ptr, int *pnum) { return OPENSSL_sk_find_all((OPENSSL_STACK *)sk, (const void *)ptr, pnum); } static __attribute__((unused)) inline void sk_EX_CALLBACK_sort(struct stack_st_EX_CALLBACK *sk) { OPENSSL_sk_sort((OPENSSL_STACK *)sk); } static __attribute__((unused)) inline int sk_EX_CALLBACK_is_sorted(const struct stack_st_EX_CALLBACK *sk) { return OPENSSL_sk_is_sorted((const OPENSSL_STACK *)sk); } static __attribute__((unused)) inline struct stack_st_EX_CALLBACK * sk_EX_CALLBACK_dup(const struct stack_st_EX_CALLBACK *sk) { return (struct stack_st_EX_CALLBACK *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk); } static __attribute__((unused)) inline struct stack_st_EX_CALLBACK *sk_EX_CALLBACK_deep_copy(const struct stack_st_EX_CALLBACK *sk, sk_EX_CALLBACK_copyfunc copyfunc, sk_EX_CALLBACK_freefunc freefunc) { return (struct stack_st_EX_CALLBACK *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk, (OPENSSL_sk_copyfunc)copyfunc, (OPENSSL_sk_freefunc)freefunc); } static __attribute__((unused)) inline sk_EX_CALLBACK_compfunc sk_EX_CALLBACK_set_cmp_func(struct stack_st_EX_CALLBACK *sk, sk_EX_CALLBACK_compfunc compare) { return (sk_EX_CALLBACK_compfunc)OPENSSL_sk_set_cmp_func((OPENSSL_STACK *)sk, (OPENSSL_sk_compfunc)compare); }
23557   
23558   typedef struct mem_st MEM;
23559   struct lhash_st_MEM { union lh_MEM_dummy { void* d1; unsigned long d2; int d3; } dummy; }; static unsigned long lh_MEM_hfn_thunk(const void *data, OPENSSL_LH_HASHFUNC hfn) { unsigned long (*hfn_conv)(const MEM *) = (unsigned long (*)(const MEM *))hfn; return hfn_conv((const MEM *)data); } static int lh_MEM_cfn_thunk(const void *da, const void *db, OPENSSL_LH_COMPFUNC cfn) { int (*cfn_conv)(const MEM *, const MEM *) = (int (*)(const MEM *, const MEM *))cfn; return cfn_conv((const MEM *)da, (const MEM *)db); } static __attribute__((unused)) inline void lh_MEM_free(struct lhash_st_MEM *lh) { OPENSSL_LH_free((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline void lh_MEM_flush(struct lhash_st_MEM *lh) { OPENSSL_LH_flush((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline MEM * lh_MEM_insert(struct lhash_st_MEM *lh, MEM *d) { return (MEM *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d); } static __attribute__((unused)) inline MEM * lh_MEM_delete(struct lhash_st_MEM *lh, const MEM *d) { return (MEM *)OPENSSL_LH_delete((OPENSSL_LHASH *)lh, d); } static __attribute__((unused)) inline MEM * lh_MEM_retrieve(struct lhash_st_MEM *lh, const MEM *d) { return (MEM *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d); } static __attribute__((unused)) inline int lh_MEM_error(struct lhash_st_MEM *lh) { return OPENSSL_LH_error((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline unsigned long lh_MEM_num_items(struct lhash_st_MEM *lh) { return OPENSSL_LH_num_items((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline unsigned long lh_MEM_get_down_load(struct lhash_st_MEM *lh) { return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh); } static __attribute__((unused)) inline void lh_MEM_set_down_load(struct lhash_st_MEM *lh, unsigned long dl) { OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl); } static __attribute__((unused)) inline void lh_MEM_doall_thunk(void *node, OPENSSL_LH_DOALL_FUNC doall) { void (*doall_conv)(MEM *) = (void (*)(MEM *))doall; doall_conv((MEM *)node); } static __attribute__((unused)) inline void lh_MEM_doall_arg_thunk(void *node, void *arg, OPENSSL_LH_DOALL_FUNCARG doall) { void (*doall_conv)(MEM *, void *) = (void (*)(MEM *, void *))doall; doall_conv((MEM *)node, arg); } static __attribute__((unused)) inline void lh_MEM_doall(struct lhash_st_MEM *lh, void (*doall)(MEM *)) { OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall); } static __attribute__((unused)) inline struct lhash_st_MEM * lh_MEM_new(unsigned long (*hfn)(const MEM *), int (*cfn)(const MEM *, const MEM *)) { return (struct lhash_st_MEM *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), lh_MEM_hfn_thunk, lh_MEM_cfn_thunk, lh_MEM_doall_thunk, lh_MEM_doall_arg_thunk); } static __attribute__((unused)) inline void lh_MEM_doall_arg(struct lhash_st_MEM *lh, void (*doallarg)(MEM *, void *), void *arg) { OPENSSL_LH_doall_arg((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNCARG)doallarg, arg); } struct lhash_st_MEM;
23560   
23561   void OPENSSL_cpuid_setup(void);
23562   
23563   
23564   
23565   extern unsigned int OPENSSL_ia32cap_P[];
23566   
23567   void OPENSSL_showfatal(const char *fmta, ...);
23568   int ossl_do_ex_data_init(OSSL_LIB_CTX *ctx);
23569   void ossl_crypto_cleanup_all_ex_data_int(OSSL_LIB_CTX *ctx);
23570   int openssl_init_fork_handlers(void);
23571   int openssl_get_fork_id(void);
23572   
23573   char *ossl_safe_getenv(const char *name);
23574   
23575   extern CRYPTO_RWLOCK *memdbg_lock;
23576   int openssl_strerror_r(int errnum, char *buf, size_t buflen);
23577   
23578   FILE *openssl_fopen(const char *filename, const char *mode);
23579   
23580   
23581   
23582   
23583   uint32_t OPENSSL_rdtsc(void);
23584   size_t OPENSSL_instrument_bus(unsigned int *, size_t);
23585   size_t OPENSSL_instrument_bus2(unsigned int *, size_t, size_t);
23586   
23587   
23588   
23589   
23590   
23591   
23592   
23593   struct ex_callback_st {
23594       long argl;
23595       void *argp;
23596       int priority;
23597       CRYPTO_EX_new *new_func;
23598       CRYPTO_EX_free *free_func;
23599       CRYPTO_EX_dup *dup_func;
23600   };
23601   
23602   
23603   
23604   
23605   
23606   typedef struct ex_callbacks_st {
23607       struct stack_st_EX_CALLBACK *meth;
23608   } EX_CALLBACKS;
23609   
23610   typedef struct ossl_ex_data_global_st {
23611       CRYPTO_RWLOCK *ex_data_lock;
23612       EX_CALLBACKS ex_data[18];
23613   } OSSL_EX_DATA_GLOBAL;
23614   # 122 "include/internal/cryptlib.h"
23615   OSSL_LIB_CTX *ossl_lib_ctx_get_concrete(OSSL_LIB_CTX *ctx);
23616   int ossl_lib_ctx_is_default(OSSL_LIB_CTX *ctx);
23617   int ossl_lib_ctx_is_global_default(OSSL_LIB_CTX *ctx);
23618   
23619   
23620   void *ossl_lib_ctx_get_data(OSSL_LIB_CTX *, int );
23621   
23622   void ossl_lib_ctx_default_deinit(void);
23623   OSSL_EX_DATA_GLOBAL *ossl_lib_ctx_get_ex_data_global(OSSL_LIB_CTX *ctx);
23624   
23625   const char *ossl_lib_ctx_get_descriptor(OSSL_LIB_CTX *libctx);
23626   
23627   OSSL_LIB_CTX *ossl_crypto_ex_data_get_ossl_lib_ctx(const CRYPTO_EX_DATA *ad);
23628   int ossl_crypto_new_ex_data_ex(OSSL_LIB_CTX *ctx, int class_index, void *obj,
23629                                  CRYPTO_EX_DATA *ad);
23630   int ossl_crypto_get_ex_new_index_ex(OSSL_LIB_CTX *ctx, int class_index,
23631                                       long argl, void *argp,
23632                                       CRYPTO_EX_new *new_func,
23633                                       CRYPTO_EX_dup *dup_func,
23634                                       CRYPTO_EX_free *free_func,
23635                                       int priority);
23636   int ossl_crypto_free_ex_index_ex(OSSL_LIB_CTX *ctx, int class_index, int idx);
23637   
23638   
23639   
23640   
23641   
23642   
23643   
23644   const void *ossl_bsearch(const void *key, const void *base, int num,
23645                            int size, int (*cmp) (const void *, const void *),
23646                            int flags);
23647   
23648   char *ossl_sk_ASN1_UTF8STRING2text(struct stack_st_ASN1_UTF8STRING *text,
23649                                      const char *sep, size_t max_len);
23650   char *ossl_ipaddr_to_asc(unsigned char *p, int len);
23651   
23652   char *ossl_buf2hexstr_sep(const unsigned char *buf, long buflen, char sep);
23653   unsigned char *ossl_hexstr2buf_sep(const char *str, long *buflen,
23654                                      const char sep);
23655   # 17 "include/internal/thread.h" 2
23656   # 1 "include/crypto/context.h" 1
23657   # 12 "include/crypto/context.h"
23658   void *ossl_provider_store_new(OSSL_LIB_CTX *);
23659   void *ossl_property_string_data_new(OSSL_LIB_CTX *);
23660   void *ossl_stored_namemap_new(OSSL_LIB_CTX *);
23661   void *ossl_property_defns_new(OSSL_LIB_CTX *);
23662   void *ossl_ctx_global_properties_new(OSSL_LIB_CTX *);
23663   void *ossl_rand_ctx_new(OSSL_LIB_CTX *);
23664   void *ossl_prov_conf_ctx_new(OSSL_LIB_CTX *);
23665   void *ossl_bio_core_globals_new(OSSL_LIB_CTX *);
23666   void *ossl_child_prov_ctx_new(OSSL_LIB_CTX *);
23667   void *ossl_prov_drbg_nonce_ctx_new(OSSL_LIB_CTX *);
23668   void *ossl_self_test_set_callback_new(OSSL_LIB_CTX *);
23669   void *ossl_rand_crng_ctx_new(OSSL_LIB_CTX *);
23670   int ossl_thread_register_fips(OSSL_LIB_CTX *);
23671   void *ossl_thread_event_ctx_new(OSSL_LIB_CTX *);
23672   void *ossl_fips_prov_ossl_ctx_new(OSSL_LIB_CTX *);
23673   
23674   void *ossl_threads_ctx_new(OSSL_LIB_CTX *);
23675   
23676   
23677   void ossl_provider_store_free(void *);
23678   void ossl_property_string_data_free(void *);
23679   void ossl_stored_namemap_free(void *);
23680   void ossl_property_defns_free(void *);
23681   void ossl_ctx_global_properties_free(void *);
23682   void ossl_rand_ctx_free(void *);
23683   void ossl_prov_conf_ctx_free(void *);
23684   void ossl_bio_core_globals_free(void *);
23685   void ossl_child_prov_ctx_free(void *);
23686   void ossl_prov_drbg_nonce_ctx_free(void *);
23687   void ossl_self_test_set_callback_free(void *);
23688   void ossl_rand_crng_ctx_free(void *);
23689   void ossl_thread_event_ctx_free(void *);
23690   void ossl_fips_prov_ossl_ctx_free(void *);
23691   void ossl_release_default_drbg_ctx(void);
23692   
23693   void ossl_threads_ctx_free(void *);
23694   # 18 "include/internal/thread.h" 2
23695   
23696   void *ossl_crypto_thread_start(OSSL_LIB_CTX *ctx, CRYPTO_THREAD_ROUTINE start,
23697                                  void *data);
23698   int ossl_crypto_thread_join(void *task, CRYPTO_THREAD_RETVAL *retval);
23699   int ossl_crypto_thread_clean(void *vhandle);
23700   uint64_t ossl_get_avail_threads(OSSL_LIB_CTX *ctx);
23701   
23702   
23703   
23704   
23705   
23706   
23707   typedef struct openssl_threads_st {
23708       uint64_t max_threads;
23709       uint64_t active_threads;
23710       CRYPTO_MUTEX *lock;
23711       CRYPTO_CONDVAR *cond_finished;
23712   } OSSL_LIB_CTX_THREADS;
23713   # 21 "include/internal/quic_channel.h" 2
23714   # 109 "include/internal/quic_channel.h"
23715   typedef struct quic_channel_args_st {
23716   
23717   
23718   
23719   
23720       QUIC_PORT *port;
23721   
23722       QUIC_LCIDM *lcidm;
23723   
23724       QUIC_SRTM *srtm;
23725   
23726       int is_server;
23727       SSL *tls;
23728   
23729   
23730       int use_qlog;
23731   
23732   
23733       const char *qlog_title;
23734   } QUIC_CHANNEL_ARGS;
23735   
23736   
23737   typedef struct quic_terminate_cause_st {
23738   
23739   
23740   
23741   
23742   
23743       uint64_t error_code;
23744   
23745   
23746   
23747   
23748   
23749       uint64_t frame_type;
23750   # 152 "include/internal/quic_channel.h"
23751       const char *reason;
23752   
23753   
23754   
23755   
23756   
23757       size_t reason_len;
23758   
23759   
23760       unsigned int app : 1;
23761   
23762   
23763   
23764   
23765   
23766   
23767   
23768       unsigned int remote : 1;
23769   } QUIC_TERMINATE_CAUSE;
23770   
23771   
23772   
23773   
23774   
23775   
23776   
23777   QUIC_CHANNEL *ossl_quic_channel_new(const QUIC_CHANNEL_ARGS *args);
23778   
23779   
23780   void ossl_quic_channel_free(QUIC_CHANNEL *ch);
23781   
23782   
23783   int ossl_quic_channel_set_mutator(QUIC_CHANNEL *ch,
23784                                     ossl_mutate_packet_cb mutatecb,
23785                                     ossl_finish_mutate_cb finishmutatecb,
23786                                     void *mutatearg);
23787   # 205 "include/internal/quic_channel.h"
23788   int ossl_quic_channel_start(QUIC_CHANNEL *ch);
23789   
23790   
23791   void ossl_quic_channel_local_close(QUIC_CHANNEL *ch, uint64_t app_error_code,
23792                                      const char *app_reason);
23793   
23794   
23795   
23796   
23797   int ossl_quic_channel_on_handshake_confirmed(QUIC_CHANNEL *ch);
23798   # 230 "include/internal/quic_channel.h"
23799   void ossl_quic_channel_raise_protocol_error_loc(QUIC_CHANNEL *ch,
23800                                                   uint64_t error_code,
23801                                                   uint64_t frame_type,
23802                                                   const char *reason,
23803                                                   ERR_STATE *err_state,
23804                                                   const char *src_file,
23805                                                   int src_line,
23806                                                   const char *src_func);
23807   # 262 "include/internal/quic_channel.h"
23808   int ossl_quic_channel_net_error(QUIC_CHANNEL *ch);
23809   
23810   
23811   void ossl_quic_channel_restore_err_state(QUIC_CHANNEL *ch);
23812   
23813   
23814   void ossl_quic_channel_on_remote_conn_close(QUIC_CHANNEL *ch,
23815                                               OSSL_QUIC_FRAME_CONN_CLOSE *f);
23816   void ossl_quic_channel_on_new_conn_id(QUIC_CHANNEL *ch,
23817                                         OSSL_QUIC_FRAME_NEW_CONN_ID *f);
23818   
23819   
23820   int ossl_quic_channel_on_new_conn(QUIC_CHANNEL *ch, const BIO_ADDR *peer,
23821                                     const QUIC_CONN_ID *peer_scid,
23822                                     const QUIC_CONN_ID *peer_dcid);
23823   
23824   
23825   void ossl_quic_channel_subtick(QUIC_CHANNEL *ch, QUIC_TICK_RESULT *r,
23826                                  uint32_t flags);
23827   
23828   
23829   void ossl_quic_channel_raise_net_error(QUIC_CHANNEL *ch);
23830   
23831   
23832   void ossl_quic_channel_on_stateless_reset(QUIC_CHANNEL *ch);
23833   
23834   void ossl_quic_channel_inject(QUIC_CHANNEL *ch, QUIC_URXE *e);
23835   
23836   
23837   
23838   
23839   
23840   
23841   
23842   QUIC_REACTOR *ossl_quic_channel_get_reactor(QUIC_CHANNEL *ch);
23843   
23844   
23845   QUIC_STREAM_MAP *ossl_quic_channel_get_qsm(QUIC_CHANNEL *ch);
23846   
23847   
23848   OSSL_STATM *ossl_quic_channel_get_statm(QUIC_CHANNEL *ch);
23849   
23850   
23851   
23852   
23853   
23854   int ossl_quic_channel_get_peer_addr(QUIC_CHANNEL *ch, BIO_ADDR *peer_addr);
23855   int ossl_quic_channel_set_peer_addr(QUIC_CHANNEL *ch, const BIO_ADDR *peer_addr);
23856   
23857   
23858   
23859   
23860   
23861   QUIC_STREAM *ossl_quic_channel_get_stream_by_id(QUIC_CHANNEL *ch,
23862                                                   uint64_t stream_id);
23863   
23864   
23865   int ossl_quic_channel_is_term_any(const QUIC_CHANNEL *ch);
23866   const QUIC_TERMINATE_CAUSE *
23867   ossl_quic_channel_get_terminate_cause(const QUIC_CHANNEL *ch);
23868   int ossl_quic_channel_is_closing(const QUIC_CHANNEL *ch);
23869   int ossl_quic_channel_is_terminated(const QUIC_CHANNEL *ch);
23870   int ossl_quic_channel_is_active(const QUIC_CHANNEL *ch);
23871   int ossl_quic_channel_is_handshake_complete(const QUIC_CHANNEL *ch);
23872   int ossl_quic_channel_is_handshake_confirmed(const QUIC_CHANNEL *ch);
23873   
23874   QUIC_PORT *ossl_quic_channel_get0_port(QUIC_CHANNEL *ch);
23875   QUIC_ENGINE *ossl_quic_channel_get0_engine(QUIC_CHANNEL *ch);
23876   QUIC_DEMUX *ossl_quic_channel_get0_demux(QUIC_CHANNEL *ch);
23877   
23878   SSL *ossl_quic_channel_get0_ssl(QUIC_CHANNEL *ch);
23879   # 347 "include/internal/quic_channel.h"
23880   CRYPTO_MUTEX *ossl_quic_channel_get_mutex(QUIC_CHANNEL *ch);
23881   
23882   
23883   
23884   
23885   
23886   
23887   QUIC_STREAM *ossl_quic_channel_new_stream_local(QUIC_CHANNEL *ch, int is_uni);
23888   
23889   
23890   
23891   
23892   
23893   
23894   
23895   QUIC_STREAM *ossl_quic_channel_new_stream_remote(QUIC_CHANNEL *ch,
23896                                                    uint64_t stream_id);
23897   
23898   
23899   
23900   
23901   
23902   
23903   
23904   void ossl_quic_channel_set_incoming_stream_auto_reject(QUIC_CHANNEL *ch,
23905                                                          int enable,
23906                                                          uint64_t aec);
23907   
23908   
23909   
23910   
23911   
23912   
23913   void ossl_quic_channel_reject_stream(QUIC_CHANNEL *ch, QUIC_STREAM *qs);
23914   
23915   
23916   int ossl_quic_channel_replace_local_cid(QUIC_CHANNEL *ch,
23917                                           const QUIC_CONN_ID *conn_id);
23918   
23919   
23920   void ossl_quic_channel_set_msg_callback(QUIC_CHANNEL *ch,
23921                                           ossl_msg_cb msg_callback,
23922                                           SSL *msg_callback_ssl);
23923   void ossl_quic_channel_set_msg_callback_arg(QUIC_CHANNEL *ch,
23924                                               void *msg_callback_arg);
23925   
23926   
23927   void ossl_quic_channel_set_txku_threshold_override(QUIC_CHANNEL *ch,
23928                                                      uint64_t tx_pkt_threshold);
23929   
23930   
23931   uint64_t ossl_quic_channel_get_tx_key_epoch(QUIC_CHANNEL *ch);
23932   uint64_t ossl_quic_channel_get_rx_key_epoch(QUIC_CHANNEL *ch);
23933   
23934   
23935   int ossl_quic_channel_trigger_txku(QUIC_CHANNEL *ch);
23936   int ossl_quic_channel_has_pending(const QUIC_CHANNEL *ch);
23937   
23938   
23939   int ossl_quic_channel_ping(QUIC_CHANNEL *ch);
23940   
23941   
23942   
23943   
23944   
23945   uint16_t ossl_quic_channel_get_diag_num_rx_ack(QUIC_CHANNEL *ch);
23946   
23947   
23948   
23949   
23950   void ossl_quic_channel_get_diag_local_cid(QUIC_CHANNEL *ch, QUIC_CONN_ID *cid);
23951   
23952   
23953   
23954   
23955   
23956   int ossl_quic_channel_is_new_local_stream_admissible(QUIC_CHANNEL *ch, int is_uni);
23957   
23958   
23959   
23960   
23961   
23962   uint64_t ossl_quic_channel_get_local_stream_count_avail(const QUIC_CHANNEL *ch,
23963                                                           int is_uni);
23964   uint64_t ossl_quic_channel_get_remote_stream_count_avail(const QUIC_CHANNEL *ch,
23965                                                            int is_uni);
23966   
23967   
23968   
23969   
23970   int ossl_quic_channel_have_generated_transport_params(const QUIC_CHANNEL *ch);
23971   
23972   
23973   void ossl_quic_channel_set_max_idle_timeout_request(QUIC_CHANNEL *ch, uint64_t ms);
23974   
23975   uint64_t ossl_quic_channel_get_max_idle_timeout_request(const QUIC_CHANNEL *ch);
23976   
23977   uint64_t ossl_quic_channel_get_max_idle_timeout_peer_request(const QUIC_CHANNEL *ch);
23978   
23979   uint64_t ossl_quic_channel_get_max_idle_timeout_actual(const QUIC_CHANNEL *ch);
23980   # 18 "include/internal/quic_ssl.h" 2
23981   
23982   
23983   
23984    SSL *ossl_quic_new(SSL_CTX *ctx);
23985    int ossl_quic_init(SSL *s);
23986   void ossl_quic_deinit(SSL *s);
23987   void ossl_quic_free(SSL *s);
23988   int ossl_quic_reset(SSL *s);
23989   int ossl_quic_clear(SSL *s);
23990    int ossl_quic_accept(SSL *s);
23991    int ossl_quic_connect(SSL *s);
23992    int ossl_quic_read(SSL *s, void *buf, size_t len, size_t *readbytes);
23993    int ossl_quic_peek(SSL *s, void *buf, size_t len, size_t *readbytes);
23994    int ossl_quic_write_flags(SSL *s, const void *buf, size_t len,
23995                                    uint64_t flags, size_t *written);
23996    int ossl_quic_write(SSL *s, const void *buf, size_t len, size_t *written);
23997    long ossl_quic_ctrl(SSL *s, int cmd, long larg, void *parg);
23998    long ossl_quic_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg);
23999    long ossl_quic_callback_ctrl(SSL *s, int cmd, void (*fp) (void));
24000    long ossl_quic_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp) (void));
24001    size_t ossl_quic_pending(const SSL *s);
24002    int ossl_quic_key_update(SSL *s, int update_type);
24003    int ossl_quic_get_key_update_type(const SSL *s);
24004    const SSL_CIPHER *ossl_quic_get_cipher_by_char(const unsigned char *p);
24005    int ossl_quic_num_ciphers(void);
24006    const SSL_CIPHER *ossl_quic_get_cipher(unsigned int u);
24007   int ossl_quic_renegotiate_check(SSL *ssl, int initok);
24008   
24009   typedef struct quic_conn_st QUIC_CONNECTION;
24010   typedef struct quic_xso_st QUIC_XSO;
24011   
24012   int ossl_quic_do_handshake(SSL *s);
24013   void ossl_quic_set_connect_state(SSL *s);
24014   void ossl_quic_set_accept_state(SSL *s);
24015   
24016    int ossl_quic_has_pending(const SSL *s);
24017    int ossl_quic_handle_events(SSL *s);
24018    int ossl_quic_get_event_timeout(SSL *s, struct timeval *tv,
24019                                          int *is_infinite);
24020   OSSL_TIME ossl_quic_get_event_deadline(SSL *s);
24021    int ossl_quic_get_rpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *d);
24022    int ossl_quic_get_wpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *d);
24023    int ossl_quic_get_net_read_desired(SSL *s);
24024    int ossl_quic_get_net_write_desired(SSL *s);
24025    int ossl_quic_get_error(const SSL *s, int i);
24026    int ossl_quic_want(const SSL *s);
24027    int ossl_quic_conn_get_blocking_mode(const SSL *s);
24028    int ossl_quic_conn_set_blocking_mode(SSL *s, int blocking);
24029    int ossl_quic_conn_shutdown(SSL *s, uint64_t flags,
24030                                      const SSL_SHUTDOWN_EX_ARGS *args,
24031                                      size_t args_len);
24032    int ossl_quic_conn_stream_conclude(SSL *s);
24033   void ossl_quic_conn_set0_net_rbio(SSL *s, BIO *net_wbio);
24034   void ossl_quic_conn_set0_net_wbio(SSL *s, BIO *net_wbio);
24035   BIO *ossl_quic_conn_get_net_rbio(const SSL *s);
24036   BIO *ossl_quic_conn_get_net_wbio(const SSL *s);
24037    int ossl_quic_conn_set_initial_peer_addr(SSL *s,
24038                                                   const BIO_ADDR *peer_addr);
24039    SSL *ossl_quic_conn_stream_new(SSL *s, uint64_t flags);
24040    SSL *ossl_quic_get0_connection(SSL *s);
24041    int ossl_quic_get_stream_type(SSL *s);
24042    uint64_t ossl_quic_get_stream_id(SSL *s);
24043    int ossl_quic_is_stream_local(SSL *s);
24044    int ossl_quic_set_default_stream_mode(SSL *s, uint32_t mode);
24045    SSL *ossl_quic_detach_stream(SSL *s);
24046    int ossl_quic_attach_stream(SSL *conn, SSL *stream);
24047    int ossl_quic_set_incoming_stream_policy(SSL *s, int policy,
24048                                                   uint64_t aec);
24049    SSL *ossl_quic_accept_stream(SSL *s, uint64_t flags);
24050    size_t ossl_quic_get_accept_stream_queue_len(SSL *s);
24051    int ossl_quic_get_value_uint(SSL *s, uint32_t class_, uint32_t id,
24052                                       uint64_t *value);
24053    int ossl_quic_set_value_uint(SSL *s, uint32_t class_, uint32_t id,
24054                                       uint64_t value);
24055   
24056    int ossl_quic_stream_reset(SSL *ssl,
24057                                     const SSL_STREAM_RESET_ARGS *args,
24058                                     size_t args_len);
24059   
24060    int ossl_quic_get_stream_read_state(SSL *ssl);
24061    int ossl_quic_get_stream_write_state(SSL *ssl);
24062    int ossl_quic_get_stream_read_error_code(SSL *ssl,
24063                                                   uint64_t *app_error_code);
24064    int ossl_quic_get_stream_write_error_code(SSL *ssl,
24065                                                    uint64_t *app_error_code);
24066    int ossl_quic_get_conn_close_info(SSL *ssl,
24067                                            SSL_CONN_CLOSE_INFO *info,
24068                                            size_t info_len);
24069   
24070   uint64_t ossl_quic_set_options(SSL *s, uint64_t opts);
24071   uint64_t ossl_quic_clear_options(SSL *s, uint64_t opts);
24072   uint64_t ossl_quic_get_options(const SSL *s);
24073   
24074   
24075    int ossl_quic_set_write_buffer_size(SSL *s, size_t size);
24076   
24077   
24078   
24079   
24080   
24081   
24082   int ossl_quic_conn_set_override_now_cb(SSL *s,
24083                                          OSSL_TIME (*now_cb)(void *arg),
24084                                          void *now_cb_arg);
24085   
24086   
24087   
24088   
24089   
24090   
24091   void ossl_quic_conn_force_assist_thread_wake(SSL *s);
24092   
24093   
24094   QUIC_CHANNEL *ossl_quic_conn_get_channel(SSL *s);
24095   
24096   int ossl_quic_has_pending(const SSL *s);
24097   int ossl_quic_get_shutdown(const SSL *s);
24098   # 143 "include/internal/quic_ssl.h"
24099   int ossl_quic_set_diag_title(SSL_CTX *ctx, const char *title);
24100   
24101   
24102   int ossl_quic_conn_poll_events(SSL *ssl, uint64_t events, int do_tick,
24103                                  uint64_t *revents);
24104   # 15 "ssl/quic/quic_local.h" 2
24105   # 1 "include/internal/quic_txp.h" 1
24106   # 17 "include/internal/quic_txp.h"
24107   # 1 "include/internal/quic_cfq.h" 1
24108   # 26 "include/internal/quic_cfq.h"
24109   typedef struct quic_cfq_item_st QUIC_CFQ_ITEM;
24110   
24111   struct quic_cfq_item_st {
24112   
24113   
24114   
24115   
24116   
24117       QUIC_CFQ_ITEM *pkt_prev, *pkt_next;
24118   
24119   
24120   };
24121   # 46 "include/internal/quic_cfq.h"
24122   uint64_t ossl_quic_cfq_item_get_frame_type(const QUIC_CFQ_ITEM *item);
24123   
24124   
24125   const unsigned char *ossl_quic_cfq_item_get_encoded(const QUIC_CFQ_ITEM *item);
24126   
24127   
24128   size_t ossl_quic_cfq_item_get_encoded_len(const QUIC_CFQ_ITEM *item);
24129   
24130   
24131   int ossl_quic_cfq_item_get_state(const QUIC_CFQ_ITEM *item);
24132   
24133   
24134   uint32_t ossl_quic_cfq_item_get_pn_space(const QUIC_CFQ_ITEM *item);
24135   
24136   
24137   int ossl_quic_cfq_item_is_unreliable(const QUIC_CFQ_ITEM *item);
24138   
24139   
24140   
24141   
24142   
24143   
24144   QUIC_CFQ *ossl_quic_cfq_new(void);
24145   void ossl_quic_cfq_free(QUIC_CFQ *cfq);
24146   # 100 "include/internal/quic_cfq.h"
24147   typedef void (cfq_free_cb)(unsigned char *buf, size_t buf_len, void *arg);
24148   
24149   QUIC_CFQ_ITEM *ossl_quic_cfq_add_frame(QUIC_CFQ *cfq,
24150                                          uint32_t priority,
24151                                          uint32_t pn_space,
24152                                          uint64_t frame_type,
24153                                          uint32_t flags,
24154                                          const unsigned char *encoded,
24155                                          size_t encoded_len,
24156                                          cfq_free_cb *free_cb,
24157                                          void *free_cb_arg);
24158   
24159   
24160   
24161   
24162   void ossl_quic_cfq_mark_tx(QUIC_CFQ *cfq, QUIC_CFQ_ITEM *item);
24163   
24164   
24165   
24166   
24167   
24168   
24169   void ossl_quic_cfq_mark_lost(QUIC_CFQ *cfq, QUIC_CFQ_ITEM *item,
24170                                uint32_t priority);
24171   
24172   
24173   
24174   
24175   
24176   void ossl_quic_cfq_release(QUIC_CFQ *cfq, QUIC_CFQ_ITEM *item);
24177   # 140 "include/internal/quic_cfq.h"
24178   QUIC_CFQ_ITEM *ossl_quic_cfq_get_priority_head(const QUIC_CFQ *cfq,
24179                                                  uint32_t pn_space);
24180   
24181   
24182   
24183   
24184   
24185   
24186   
24187   QUIC_CFQ_ITEM *ossl_quic_cfq_item_get_priority_next(const QUIC_CFQ_ITEM *item,
24188                                                       uint32_t pn_space);
24189   # 18 "include/internal/quic_txp.h" 2
24190   # 1 "include/internal/quic_txpim.h" 1
24191   # 26 "include/internal/quic_txpim.h"
24192   typedef struct quic_txpim_pkt_st {
24193   
24194       OSSL_ACKM_TX_PKT ackm_pkt;
24195   
24196   
24197       QUIC_CFQ_ITEM *retx_head;
24198   
24199   
24200       QUIC_FIFD *fifd;
24201   
24202   
24203       unsigned char pkt_type;
24204   
24205   
24206       unsigned int had_handshake_done_frame : 1;
24207       unsigned int had_max_data_frame : 1;
24208       unsigned int had_max_streams_bidi_frame : 1;
24209       unsigned int had_max_streams_uni_frame : 1;
24210       unsigned int had_ack_frame : 1;
24211       unsigned int had_conn_close : 1;
24212   
24213   
24214   } QUIC_TXPIM_PKT;
24215   
24216   
24217   typedef struct quic_txpim_chunk_st {
24218   
24219       uint64_t stream_id;
24220   
24221   
24222   
24223   
24224   
24225   
24226       uint64_t start, end;
24227   
24228   
24229   
24230   
24231       unsigned int has_fin : 1;
24232   
24233   
24234   
24235   
24236       unsigned int has_stop_sending : 1;
24237   
24238   
24239   
24240   
24241       unsigned int has_reset_stream : 1;
24242   } QUIC_TXPIM_CHUNK;
24243   
24244   QUIC_TXPIM *ossl_quic_txpim_new(void);
24245   
24246   
24247   
24248   
24249   
24250   
24251   void ossl_quic_txpim_free(QUIC_TXPIM *txpim);
24252   
24253   
24254   
24255   
24256   
24257   
24258   QUIC_TXPIM_PKT *ossl_quic_txpim_pkt_alloc(QUIC_TXPIM *txpim);
24259   
24260   
24261   
24262   
24263   void ossl_quic_txpim_pkt_release(QUIC_TXPIM *txpim, QUIC_TXPIM_PKT *fpkt);
24264   
24265   
24266   void ossl_quic_txpim_pkt_clear_chunks(QUIC_TXPIM_PKT *fpkt);
24267   
24268   
24269   int ossl_quic_txpim_pkt_append_chunk(QUIC_TXPIM_PKT *fpkt,
24270                                        const QUIC_TXPIM_CHUNK *chunk);
24271   
24272   
24273   void ossl_quic_txpim_pkt_add_cfq_item(QUIC_TXPIM_PKT *fpkt,
24274                                         QUIC_CFQ_ITEM *item);
24275   # 119 "include/internal/quic_txpim.h"
24276   const QUIC_TXPIM_CHUNK *ossl_quic_txpim_pkt_get_chunks(const QUIC_TXPIM_PKT *fpkt);
24277   
24278   
24279   
24280   
24281   
24282   size_t ossl_quic_txpim_pkt_get_num_chunks(const QUIC_TXPIM_PKT *fpkt);
24283   
24284   
24285   
24286   
24287   
24288   size_t ossl_quic_txpim_get_in_use(const QUIC_TXPIM *txpim);
24289   # 19 "include/internal/quic_txp.h" 2
24290   # 1 "include/internal/quic_stream.h" 1
24291   # 12 "include/internal/quic_stream.h"
24292           
24293   # 21 "include/internal/quic_stream.h"
24294   # 1 "include/internal/quic_fc.h" 1
24295   # 24 "include/internal/quic_fc.h"
24296   typedef struct quic_txfc_st QUIC_TXFC;
24297   
24298   struct quic_txfc_st {
24299       QUIC_TXFC *parent;
24300       uint64_t swm, cwm;
24301       char has_become_blocked;
24302   };
24303   
24304   
24305   
24306   
24307   
24308   
24309   int ossl_quic_txfc_init(QUIC_TXFC *txfc, QUIC_TXFC *conn_txfc);
24310   
24311   
24312   
24313   
24314   
24315   QUIC_TXFC *ossl_quic_txfc_get_parent(QUIC_TXFC *txfc);
24316   # 55 "include/internal/quic_fc.h"
24317   int ossl_quic_txfc_bump_cwm(QUIC_TXFC *txfc, uint64_t cwm);
24318   # 67 "include/internal/quic_fc.h"
24319   uint64_t ossl_quic_txfc_get_credit(QUIC_TXFC *txfc, uint64_t consumed);
24320   
24321   
24322   
24323   
24324   
24325   
24326   
24327   uint64_t ossl_quic_txfc_get_credit_local(QUIC_TXFC *txfc, uint64_t consumed);
24328   # 92 "include/internal/quic_fc.h"
24329   int ossl_quic_txfc_consume_credit(QUIC_TXFC *txfc, uint64_t num_bytes);
24330   
24331   
24332   
24333   
24334   
24335   
24336   int ossl_quic_txfc_consume_credit_local(QUIC_TXFC *txfc, uint64_t num_bytes);
24337   # 108 "include/internal/quic_fc.h"
24338   int ossl_quic_txfc_has_become_blocked(QUIC_TXFC *txfc, int clear);
24339   
24340   
24341   
24342   
24343   
24344   uint64_t ossl_quic_txfc_get_cwm(QUIC_TXFC *txfc);
24345   
24346   
24347   
24348   
24349   
24350   uint64_t ossl_quic_txfc_get_swm(QUIC_TXFC *txfc);
24351   
24352   
24353   
24354   
24355   
24356   typedef struct quic_rxfc_st QUIC_RXFC;
24357   
24358   struct quic_rxfc_st {
24359   # 137 "include/internal/quic_fc.h"
24360       uint64_t cwm, swm, rwm, esrwm, hwm, cur_window_size, max_window_size;
24361       OSSL_TIME epoch_start;
24362       OSSL_TIME (*now)(void *arg);
24363       void *now_arg;
24364       QUIC_RXFC *parent;
24365       unsigned char error_code, has_cwm_changed, is_fin, standalone;
24366   };
24367   # 153 "include/internal/quic_fc.h"
24368   int ossl_quic_rxfc_init(QUIC_RXFC *rxfc, QUIC_RXFC *conn_rxfc,
24369                           uint64_t initial_window_size,
24370                           uint64_t max_window_size,
24371                           OSSL_TIME (*now)(void *arg),
24372                           void *now_arg);
24373   
24374   
24375   
24376   
24377   
24378   
24379   int ossl_quic_rxfc_init_standalone(QUIC_RXFC *rxfc,
24380                                      uint64_t initial_window_size,
24381                                      OSSL_TIME (*now)(void *arg),
24382                                      void *now_arg);
24383   
24384   
24385   
24386   
24387   
24388   QUIC_RXFC *ossl_quic_rxfc_get_parent(QUIC_RXFC *rxfc);
24389   
24390   
24391   
24392   
24393   void ossl_quic_rxfc_set_max_window_size(QUIC_RXFC *rxfc,
24394                                           size_t max_window_size);
24395   # 199 "include/internal/quic_fc.h"
24396   int ossl_quic_rxfc_on_rx_stream_frame(QUIC_RXFC *rxfc,
24397                                         uint64_t end, int is_fin);
24398   # 219 "include/internal/quic_fc.h"
24399   int ossl_quic_rxfc_on_retire(QUIC_RXFC *rxfc,
24400                                uint64_t num_bytes,
24401                                OSSL_TIME rtt);
24402   # 232 "include/internal/quic_fc.h"
24403   uint64_t ossl_quic_rxfc_get_cwm(const QUIC_RXFC *rxfc);
24404   
24405   
24406   
24407   
24408   
24409   
24410   uint64_t ossl_quic_rxfc_get_swm(const QUIC_RXFC *rxfc);
24411   
24412   
24413   
24414   
24415   
24416   uint64_t ossl_quic_rxfc_get_rwm(const QUIC_RXFC *rxfc);
24417   
24418   
24419   
24420   
24421   
24422   uint64_t ossl_quic_rxfc_get_credit(const QUIC_RXFC *rxfc);
24423   
24424   
24425   
24426   
24427   
24428   int ossl_quic_rxfc_has_cwm_changed(QUIC_RXFC *rxfc, int clear);
24429   # 272 "include/internal/quic_fc.h"
24430   int ossl_quic_rxfc_get_error(QUIC_RXFC *rxfc, int clear);
24431   
24432   
24433   
24434   
24435   
24436   
24437   int ossl_quic_rxfc_get_final_size(const QUIC_RXFC *rxfc, uint64_t *final_size);
24438   # 22 "include/internal/quic_stream.h" 2
24439   # 60 "include/internal/quic_stream.h"
24440   QUIC_SSTREAM *ossl_quic_sstream_new(size_t init_buf_size);
24441   
24442   
24443   
24444   
24445   
24446   
24447   
24448   void ossl_quic_sstream_free(QUIC_SSTREAM *qss);
24449   # 128 "include/internal/quic_stream.h"
24450   int ossl_quic_sstream_get_stream_frame(QUIC_SSTREAM *qss,
24451                                          size_t skip,
24452                                          OSSL_QUIC_FRAME_STREAM *hdr,
24453                                          OSSL_QTX_IOVEC *iov,
24454                                          size_t *num_iov);
24455   
24456   
24457   
24458   
24459   
24460   int ossl_quic_sstream_has_pending(QUIC_SSTREAM *qss);
24461   
24462   
24463   
24464   
24465   
24466   uint64_t ossl_quic_sstream_get_cur_size(QUIC_SSTREAM *qss);
24467   # 163 "include/internal/quic_stream.h"
24468   int ossl_quic_sstream_mark_transmitted(QUIC_SSTREAM *qss,
24469                                          uint64_t start,
24470                                          uint64_t end);
24471   # 176 "include/internal/quic_stream.h"
24472   int ossl_quic_sstream_mark_transmitted_fin(QUIC_SSTREAM *qss,
24473                                              uint64_t final_size);
24474   # 190 "include/internal/quic_stream.h"
24475   int ossl_quic_sstream_mark_lost(QUIC_SSTREAM *qss,
24476                                   uint64_t start,
24477                                   uint64_t end);
24478   
24479   
24480   
24481   
24482   
24483   
24484   
24485   int ossl_quic_sstream_mark_lost_fin(QUIC_SSTREAM *qss);
24486   # 214 "include/internal/quic_stream.h"
24487   int ossl_quic_sstream_mark_acked(QUIC_SSTREAM *qss,
24488                                    uint64_t start,
24489                                    uint64_t end);
24490   
24491   
24492   
24493   
24494   
24495   
24496   
24497   int ossl_quic_sstream_mark_acked_fin(QUIC_SSTREAM *qss);
24498   # 239 "include/internal/quic_stream.h"
24499   int ossl_quic_sstream_append(QUIC_SSTREAM *qss,
24500                                const unsigned char *buf,
24501                                size_t buf_len,
24502                                size_t *consumed);
24503   
24504   
24505   
24506   
24507   
24508   void ossl_quic_sstream_fin(QUIC_SSTREAM *qss);
24509   
24510   
24511   
24512   
24513   
24514   int ossl_quic_sstream_get_final_size(QUIC_SSTREAM *qss, uint64_t *final_size);
24515   
24516   
24517   
24518   
24519   
24520   int ossl_quic_sstream_is_totally_acked(QUIC_SSTREAM *qss);
24521   # 272 "include/internal/quic_stream.h"
24522   int ossl_quic_sstream_set_buffer_size(QUIC_SSTREAM *qss, size_t num_bytes);
24523   
24524   
24525   
24526   
24527   size_t ossl_quic_sstream_get_buffer_size(QUIC_SSTREAM *qss);
24528   
24529   
24530   
24531   
24532   size_t ossl_quic_sstream_get_buffer_used(QUIC_SSTREAM *qss);
24533   
24534   
24535   
24536   
24537   size_t ossl_quic_sstream_get_buffer_avail(QUIC_SSTREAM *qss);
24538   
24539   
24540   
24541   
24542   
24543   
24544   void ossl_quic_sstream_adjust_iov(size_t len,
24545                                     OSSL_QTX_IOVEC *iov,
24546                                     size_t num_iov);
24547   
24548   
24549   
24550   
24551   void ossl_quic_sstream_set_cleanse(QUIC_SSTREAM *qss, int cleanse);
24552   # 324 "include/internal/quic_stream.h"
24553   QUIC_RSTREAM *ossl_quic_rstream_new(QUIC_RXFC *rxfc,
24554                                       OSSL_STATM *statm, size_t rbuf_size);
24555   
24556   
24557   
24558   
24559   void ossl_quic_rstream_free(QUIC_RSTREAM *qrs);
24560   # 342 "include/internal/quic_stream.h"
24561   int ossl_quic_rstream_queue_data(QUIC_RSTREAM *qrs, OSSL_QRX_PKT *pkt,
24562                                    uint64_t offset,
24563                                    const unsigned char *data, uint64_t data_len,
24564                                    int fin);
24565   
24566   
24567   
24568   
24569   
24570   
24571   
24572   int ossl_quic_rstream_read(QUIC_RSTREAM *qrs, unsigned char *buf, size_t size,
24573                              size_t *readbytes, int *fin);
24574   
24575   
24576   
24577   
24578   
24579   
24580   
24581   int ossl_quic_rstream_peek(QUIC_RSTREAM *qrs, unsigned char *buf, size_t size,
24582                              size_t *readbytes, int *fin);
24583   
24584   
24585   
24586   
24587   
24588   
24589   int ossl_quic_rstream_available(QUIC_RSTREAM *qrs, size_t *avail, int *fin);
24590   # 384 "include/internal/quic_stream.h"
24591   int ossl_quic_rstream_get_record(QUIC_RSTREAM *qrs,
24592                                    const unsigned char **record, size_t *rec_len,
24593                                    int *fin);
24594   # 400 "include/internal/quic_stream.h"
24595   int ossl_quic_rstream_release_record(QUIC_RSTREAM *qrs, size_t read_len);
24596   # 410 "include/internal/quic_stream.h"
24597   int ossl_quic_rstream_move_to_rbuf(QUIC_RSTREAM *qrs);
24598   # 420 "include/internal/quic_stream.h"
24599   int ossl_quic_rstream_resize_rbuf(QUIC_RSTREAM *qrs, size_t rbuf_size);
24600   
24601   
24602   
24603   
24604   void ossl_quic_rstream_set_cleanse(QUIC_RSTREAM *qrs, int cleanse);
24605   # 20 "include/internal/quic_txp.h" 2
24606   # 1 "include/internal/quic_stream_map.h" 1
24607   # 12 "include/internal/quic_stream_map.h"
24608           
24609   # 32 "include/internal/quic_stream_map.h"
24610   typedef struct quic_stream_list_node_st QUIC_STREAM_LIST_NODE;
24611   
24612   struct quic_stream_list_node_st {
24613       QUIC_STREAM_LIST_NODE *prev, *next;
24614   };
24615   # 80 "include/internal/quic_stream_map.h"
24616   struct quic_stream_st {
24617       QUIC_STREAM_LIST_NODE active_node;
24618       QUIC_STREAM_LIST_NODE accept_node;
24619       QUIC_STREAM_LIST_NODE ready_for_gc_node;
24620   
24621   
24622       QUIC_STREAM *txp_next;
24623   
24624   
24625   
24626   
24627   
24628   
24629       uint64_t id;
24630   
24631   
24632   
24633   
24634   
24635       uint64_t stop_sending_aec;
24636   
24637   
24638   
24639   
24640   
24641       uint64_t reset_stream_aec;
24642   
24643   
24644   
24645   
24646   
24647       uint64_t peer_stop_sending_aec;
24648   
24649   
24650   
24651   
24652   
24653       uint64_t peer_reset_stream_aec;
24654   
24655   
24656       uint64_t txp_txfc_new_credit_consumed;
24657   # 133 "include/internal/quic_stream_map.h"
24658       uint64_t send_final_size;
24659   # 151 "include/internal/quic_stream_map.h"
24660       QUIC_SSTREAM *sstream;
24661       QUIC_RSTREAM *rstream;
24662   
24663   
24664       QUIC_TXFC txfc;
24665       QUIC_RXFC rxfc;
24666   
24667       unsigned int type : 8;
24668   
24669       unsigned int send_state : 8;
24670       unsigned int recv_state : 8;
24671   
24672   
24673       unsigned int active : 1;
24674   # 173 "include/internal/quic_stream_map.h"
24675       unsigned int as_server : 1;
24676   
24677   
24678   
24679   
24680   
24681   
24682       unsigned int stop_sending : 1;
24683   
24684   
24685   
24686   
24687   
24688   
24689       unsigned int peer_stop_sending : 1;
24690   
24691   
24692       unsigned int txp_sent_fc : 1;
24693       unsigned int txp_sent_stop_sending : 1;
24694       unsigned int txp_sent_reset_stream : 1;
24695       unsigned int txp_drained : 1;
24696       unsigned int txp_blocked : 1;
24697   
24698   
24699       unsigned int want_max_stream_data : 1;
24700       unsigned int want_stop_sending : 1;
24701       unsigned int want_reset_stream : 1;
24702   
24703   
24704       unsigned int acked_stop_sending : 1;
24705   # 312 "include/internal/quic_stream_map.h"
24706       unsigned int deleted : 1;
24707   
24708       unsigned int ready_for_gc : 1;
24709   
24710       unsigned int shutdown_flush : 1;
24711   };
24712   # 327 "include/internal/quic_stream_map.h"
24713   void ossl_quic_stream_check(const QUIC_STREAM *s);
24714   
24715   
24716   
24717   
24718   
24719   static inline __attribute__((unused)) int ossl_quic_stream_is_server_init(const QUIC_STREAM *s)
24720   {
24721       return (s->type & 1) == 1;
24722   }
24723   
24724   
24725   
24726   
24727   static inline __attribute__((unused)) int ossl_quic_stream_is_bidi(const QUIC_STREAM *s)
24728   {
24729       return (s->type & 2) == 0;
24730   }
24731   
24732   
24733   static inline __attribute__((unused)) int ossl_quic_stream_is_local_init(const QUIC_STREAM *s)
24734   {
24735       return ossl_quic_stream_is_server_init(s) == s->as_server;
24736   }
24737   # 359 "include/internal/quic_stream_map.h"
24738   static inline __attribute__((unused)) int ossl_quic_stream_has_send(const QUIC_STREAM *s)
24739   {
24740       return s->send_state != 0;
24741   }
24742   # 372 "include/internal/quic_stream_map.h"
24743   static inline __attribute__((unused)) int ossl_quic_stream_has_recv(const QUIC_STREAM *s)
24744   {
24745       return s->recv_state != 0;
24746   }
24747   # 394 "include/internal/quic_stream_map.h"
24748   static inline __attribute__((unused)) int ossl_quic_stream_has_send_buffer(const QUIC_STREAM *s)
24749   {
24750       switch (s->send_state) {
24751       case 1:
24752       case 2:
24753       case 3:
24754           return 1;
24755       default:
24756           return 0;
24757       }
24758   }
24759   
24760   
24761   
24762   
24763   
24764   static inline __attribute__((unused)) int ossl_quic_stream_send_is_reset(const QUIC_STREAM *s)
24765   {
24766       return s->send_state == 5
24767           || s->send_state == 6;
24768   }
24769   # 427 "include/internal/quic_stream_map.h"
24770   static inline __attribute__((unused)) int ossl_quic_stream_has_recv_buffer(const QUIC_STREAM *s)
24771   {
24772       switch (s->recv_state) {
24773       case 1:
24774       case 2:
24775       case 3:
24776           return 1;
24777       default:
24778           return 0;
24779       }
24780   }
24781   
24782   
24783   
24784   
24785   
24786   static inline __attribute__((unused)) int ossl_quic_stream_recv_is_reset(const QUIC_STREAM *s)
24787   {
24788       return s->recv_state == 5
24789           || s->recv_state == 6;
24790   }
24791   
24792   
24793   
24794   
24795   
24796   
24797   
24798   static inline __attribute__((unused)) int ossl_quic_stream_send_get_final_size(const QUIC_STREAM *s,
24799                                                                           uint64_t *final_size)
24800   {
24801       switch (s->send_state) {
24802       default:
24803       case 0:
24804           return 0;
24805       case 2:
24806   
24807   
24808   
24809   
24810   
24811           return ossl_quic_sstream_get_final_size(s->sstream, final_size);
24812       case 3:
24813       case 4:
24814       case 5:
24815       case 6:
24816           if (final_size != 
24817   # 473 "include/internal/quic_stream_map.h" 3 4
24818                            ((void *)0)
24819   # 473 "include/internal/quic_stream_map.h"
24820                                )
24821               *final_size = s->send_final_size;
24822           return 1;
24823       }
24824   }
24825   
24826   
24827   
24828   
24829   
24830   
24831   
24832   static inline __attribute__((unused)) int ossl_quic_stream_recv_get_final_size(const QUIC_STREAM *s,
24833                                                                           uint64_t *final_size)
24834   {
24835       switch (s->recv_state) {
24836       default:
24837       case 0:
24838       case 1:
24839           return 0;
24840   
24841       case 2:
24842       case 3:
24843       case 4:
24844       case 5:
24845       case 6:
24846           if (!__builtin_expect(!!((ossl_quic_rxfc_get_final_size(&s->rxfc, final_size)) != 0), 1))
24847               return 0;
24848   
24849           return 1;
24850       }
24851   }
24852   # 517 "include/internal/quic_stream_map.h"
24853   struct quic_stream_map_st {
24854       struct lhash_st_QUIC_STREAM *map;
24855       QUIC_STREAM_LIST_NODE active_list;
24856       QUIC_STREAM_LIST_NODE accept_list;
24857       QUIC_STREAM_LIST_NODE ready_for_gc_list;
24858       size_t rr_stepping, rr_counter;
24859       size_t num_accept_bidi, num_accept_uni, num_shutdown_flush;
24860       QUIC_STREAM *rr_cur;
24861       uint64_t (*get_stream_limit_cb)(int uni, void *arg);
24862       void *get_stream_limit_cb_arg;
24863       QUIC_RXFC *max_streams_bidi_rxfc;
24864       QUIC_RXFC *max_streams_uni_rxfc;
24865       int is_server;
24866   };
24867   # 545 "include/internal/quic_stream_map.h"
24868   int ossl_quic_stream_map_init(QUIC_STREAM_MAP *qsm,
24869                                 uint64_t (*get_stream_limit_cb)(int uni, void *arg),
24870                                 void *get_stream_limit_cb_arg,
24871                                 QUIC_RXFC *max_streams_bidi_rxfc,
24872                                 QUIC_RXFC *max_streams_uni_rxfc,
24873                                 int is_server);
24874   
24875   
24876   
24877   
24878   
24879   void ossl_quic_stream_map_cleanup(QUIC_STREAM_MAP *qsm);
24880   # 567 "include/internal/quic_stream_map.h"
24881   QUIC_STREAM *ossl_quic_stream_map_alloc(QUIC_STREAM_MAP *qsm,
24882                                           uint64_t stream_id,
24883                                           int type);
24884   
24885   
24886   
24887   
24888   
24889   void ossl_quic_stream_map_release(QUIC_STREAM_MAP *qsm, QUIC_STREAM *stream);
24890   
24891   
24892   
24893   
24894   
24895   void ossl_quic_stream_map_visit(QUIC_STREAM_MAP *qsm,
24896                                   void (*visit_cb)(QUIC_STREAM *stream, void *arg),
24897                                   void *visit_cb_arg);
24898   
24899   
24900   
24901   
24902   QUIC_STREAM *ossl_quic_stream_map_get_by_id(QUIC_STREAM_MAP *qsm,
24903                                               uint64_t stream_id);
24904   # 602 "include/internal/quic_stream_map.h"
24905   void ossl_quic_stream_map_update_state(QUIC_STREAM_MAP *qsm, QUIC_STREAM *s);
24906   
24907   
24908   
24909   
24910   
24911   void ossl_quic_stream_map_set_rr_stepping(QUIC_STREAM_MAP *qsm, size_t stepping);
24912   # 617 "include/internal/quic_stream_map.h"
24913   int ossl_quic_stream_map_is_local_allowed_by_stream_limit(QUIC_STREAM_MAP *qsm,
24914                                                             uint64_t stream_ordinal,
24915                                                             int is_uni);
24916   # 643 "include/internal/quic_stream_map.h"
24917   int ossl_quic_stream_map_ensure_send_part_id(QUIC_STREAM_MAP *qsm,
24918                                                QUIC_STREAM *qs);
24919   # 658 "include/internal/quic_stream_map.h"
24920   int ossl_quic_stream_map_notify_all_data_sent(QUIC_STREAM_MAP *qsm,
24921                                                 QUIC_STREAM *qs);
24922   # 672 "include/internal/quic_stream_map.h"
24923   int ossl_quic_stream_map_notify_totally_acked(QUIC_STREAM_MAP *qsm,
24924                                                 QUIC_STREAM *qs);
24925   # 686 "include/internal/quic_stream_map.h"
24926   int ossl_quic_stream_map_reset_stream_send_part(QUIC_STREAM_MAP *qsm,
24927                                                   QUIC_STREAM *qs,
24928                                                   uint64_t aec);
24929   # 703 "include/internal/quic_stream_map.h"
24930   int ossl_quic_stream_map_notify_reset_stream_acked(QUIC_STREAM_MAP *qsm,
24931                                                      QUIC_STREAM *qs);
24932   # 719 "include/internal/quic_stream_map.h"
24933   int ossl_quic_stream_map_notify_size_known_recv_part(QUIC_STREAM_MAP *qsm,
24934                                                        QUIC_STREAM *qs,
24935                                                        uint64_t final_size);
24936   
24937   
24938   
24939   
24940   
24941   
24942   
24943   int ossl_quic_stream_map_notify_totally_received(QUIC_STREAM_MAP *qsm,
24944                                                    QUIC_STREAM *qs);
24945   # 739 "include/internal/quic_stream_map.h"
24946   int ossl_quic_stream_map_notify_totally_read(QUIC_STREAM_MAP *qsm,
24947                                                QUIC_STREAM *qs);
24948   
24949   
24950   
24951   
24952   
24953   
24954   
24955   int ossl_quic_stream_map_notify_reset_recv_part(QUIC_STREAM_MAP *qsm,
24956                                                   QUIC_STREAM *qs,
24957                                                   uint64_t app_error_code,
24958                                                   uint64_t final_size);
24959   
24960   
24961   
24962   
24963   
24964   
24965   int ossl_quic_stream_map_notify_app_read_reset_recv_part(QUIC_STREAM_MAP *qsm,
24966                                                            QUIC_STREAM *qs);
24967   # 769 "include/internal/quic_stream_map.h"
24968   int ossl_quic_stream_map_stop_sending_recv_part(QUIC_STREAM_MAP *qsm,
24969                                                   QUIC_STREAM *qs,
24970                                                   uint64_t aec);
24971   
24972   
24973   
24974   
24975   
24976   
24977   int ossl_quic_stream_map_schedule_stop_sending(QUIC_STREAM_MAP *qsm,
24978                                                  QUIC_STREAM *qs);
24979   # 790 "include/internal/quic_stream_map.h"
24980   void ossl_quic_stream_map_push_accept_queue(QUIC_STREAM_MAP *qsm,
24981                                               QUIC_STREAM *s);
24982   
24983   
24984   
24985   
24986   
24987   QUIC_STREAM *ossl_quic_stream_map_peek_accept_queue(QUIC_STREAM_MAP *qsm);
24988   
24989   
24990   
24991   
24992   
24993   
24994   
24995   void ossl_quic_stream_map_remove_from_accept_queue(QUIC_STREAM_MAP *qsm,
24996                                                      QUIC_STREAM *s,
24997                                                      OSSL_TIME rtt);
24998   
24999   
25000   size_t ossl_quic_stream_map_get_accept_queue_len(QUIC_STREAM_MAP *qsm, int is_uni);
25001   
25002   
25003   size_t ossl_quic_stream_map_get_total_accept_queue_len(QUIC_STREAM_MAP *qsm);
25004   # 824 "include/internal/quic_stream_map.h"
25005   void ossl_quic_stream_map_gc(QUIC_STREAM_MAP *qsm);
25006   # 833 "include/internal/quic_stream_map.h"
25007   void ossl_quic_stream_map_begin_shutdown_flush(QUIC_STREAM_MAP *qsm);
25008   
25009   
25010   
25011   
25012   
25013   int ossl_quic_stream_map_is_shutdown_flush_finished(QUIC_STREAM_MAP *qsm);
25014   # 859 "include/internal/quic_stream_map.h"
25015   typedef struct quic_stream_iter_st {
25016       QUIC_STREAM_MAP *qsm;
25017       QUIC_STREAM *first_stream, *stream;
25018   } QUIC_STREAM_ITER;
25019   
25020   
25021   
25022   
25023   
25024   
25025   void ossl_quic_stream_iter_init(QUIC_STREAM_ITER *it, QUIC_STREAM_MAP *qsm,
25026                                   int advance_rr);
25027   
25028   
25029   
25030   
25031   
25032   
25033   void ossl_quic_stream_iter_next(QUIC_STREAM_ITER *it);
25034   # 21 "include/internal/quic_txp.h" 2
25035   # 32 "include/internal/quic_txp.h"
25036   typedef struct ossl_quic_tx_packetiser_args_st {
25037   
25038       QUIC_CONN_ID cur_scid;
25039       QUIC_CONN_ID cur_dcid;
25040       BIO_ADDR peer;
25041       uint32_t ack_delay_exponent;
25042   
25043   
25044       OSSL_QTX *qtx;
25045       QUIC_TXPIM *txpim;
25046       QUIC_CFQ *cfq;
25047       OSSL_ACKM *ackm;
25048       QUIC_STREAM_MAP *qsm;
25049       QUIC_TXFC *conn_txfc;
25050       QUIC_RXFC *conn_rxfc;
25051       QUIC_RXFC *max_streams_bidi_rxfc;
25052       QUIC_RXFC *max_streams_uni_rxfc;
25053       const OSSL_CC_METHOD *cc_method;
25054       OSSL_CC_DATA *cc_data;
25055       OSSL_TIME (*now)(void *arg);
25056       void *now_arg;
25057       QLOG *(*get_qlog_cb)(void *arg);
25058       void *get_qlog_cb_arg;
25059   
25060   
25061   
25062   
25063   
25064   
25065   
25066       QUIC_SSTREAM *crypto[QUIC_PN_SPACE_NUM];
25067   
25068    } OSSL_QUIC_TX_PACKETISER_ARGS;
25069   
25070   OSSL_QUIC_TX_PACKETISER *ossl_quic_tx_packetiser_new(const OSSL_QUIC_TX_PACKETISER_ARGS *args);
25071   
25072   typedef void (ossl_quic_initial_token_free_fn)(const unsigned char *buf,
25073                                                  size_t buf_len, void *arg);
25074   
25075   void ossl_quic_tx_packetiser_free(OSSL_QUIC_TX_PACKETISER *txp);
25076   
25077   
25078   
25079   
25080   
25081   
25082   void ossl_quic_tx_packetiser_record_received_closing_bytes(
25083           OSSL_QUIC_TX_PACKETISER *txp, size_t n);
25084   # 93 "include/internal/quic_txp.h"
25085   typedef struct quic_txp_status_st {
25086       int sent_ack_eliciting;
25087       int sent_handshake;
25088       size_t sent_pkt;
25089   } QUIC_TXP_STATUS;
25090   
25091   int ossl_quic_tx_packetiser_generate(OSSL_QUIC_TX_PACKETISER *txp,
25092                                        QUIC_TXP_STATUS *status);
25093   # 112 "include/internal/quic_txp.h"
25094   OSSL_TIME ossl_quic_tx_packetiser_get_deadline(OSSL_QUIC_TX_PACKETISER *txp);
25095   # 121 "include/internal/quic_txp.h"
25096   int ossl_quic_tx_packetiser_set_initial_token(OSSL_QUIC_TX_PACKETISER *txp,
25097                                                 const unsigned char *token,
25098                                                 size_t token_len,
25099                                                 ossl_quic_initial_token_free_fn *free_cb,
25100                                                 void *free_cb_arg);
25101   
25102   
25103   int ossl_quic_tx_packetiser_set_cur_dcid(OSSL_QUIC_TX_PACKETISER *txp,
25104                                            const QUIC_CONN_ID *dcid);
25105   
25106   
25107   int ossl_quic_tx_packetiser_set_cur_scid(OSSL_QUIC_TX_PACKETISER *txp,
25108                                            const QUIC_CONN_ID *scid);
25109   
25110   
25111   
25112   
25113   
25114   int ossl_quic_tx_packetiser_set_peer(OSSL_QUIC_TX_PACKETISER *txp,
25115                                        const BIO_ADDR *peer);
25116   
25117   
25118   
25119   
25120   void ossl_quic_tx_packetiser_set_qlog_cb(OSSL_QUIC_TX_PACKETISER *txp,
25121                                            QLOG *(*get_qlog_cb)(void *arg),
25122                                            void *get_qlog_cb_arg);
25123   # 158 "include/internal/quic_txp.h"
25124   int ossl_quic_tx_packetiser_discard_enc_level(OSSL_QUIC_TX_PACKETISER *txp,
25125                                                 uint32_t enc_level);
25126   
25127   
25128   
25129   
25130   
25131   
25132   
25133   void ossl_quic_tx_packetiser_notify_handshake_complete(OSSL_QUIC_TX_PACKETISER *txp);
25134   
25135   
25136   void ossl_quic_tx_packetiser_schedule_handshake_done(OSSL_QUIC_TX_PACKETISER *txp);
25137   
25138   
25139   void ossl_quic_tx_packetiser_schedule_ack_eliciting(OSSL_QUIC_TX_PACKETISER *txp,
25140                                                       uint32_t pn_space);
25141   
25142   
25143   
25144   
25145   
25146   void ossl_quic_tx_packetiser_schedule_ack(OSSL_QUIC_TX_PACKETISER *txp,
25147                                             uint32_t pn_space);
25148   # 190 "include/internal/quic_txp.h"
25149   int ossl_quic_tx_packetiser_schedule_conn_close(OSSL_QUIC_TX_PACKETISER *txp,
25150                                                   const OSSL_QUIC_FRAME_CONN_CLOSE *f);
25151   
25152   
25153   void ossl_quic_tx_packetiser_set_msg_callback(OSSL_QUIC_TX_PACKETISER *txp,
25154                                                 ossl_msg_cb msg_callback,
25155                                                 SSL *msg_callback_ssl);
25156   void ossl_quic_tx_packetiser_set_msg_callback_arg(OSSL_QUIC_TX_PACKETISER *txp,
25157                                                     void *msg_callback_arg);
25158   
25159   
25160   
25161   
25162   QUIC_PN ossl_quic_tx_packetiser_get_next_pn(OSSL_QUIC_TX_PACKETISER *txp,
25163                                               uint32_t pn_space);
25164   
25165   
25166   
25167   
25168   
25169   void ossl_quic_tx_packetiser_set_ack_tx_cb(OSSL_QUIC_TX_PACKETISER *txp,
25170                                              void (*cb)(const OSSL_QUIC_FRAME_ACK *ack,
25171                                                         uint32_t pn_space,
25172                                                         void *arg),
25173                                              void *cb_arg);
25174   # 16 "ssl/quic/quic_local.h" 2
25175   
25176   
25177   
25178   # 1 "include/internal/quic_tls.h" 1
25179   # 19 "include/internal/quic_tls.h"
25180   typedef struct quic_tls_args_st {
25181   
25182   
25183   
25184   
25185       SSL *s;
25186   
25187   
25188   
25189   
25190   
25191   
25192   
25193       int (*crypto_send_cb)(const unsigned char *buf, size_t buf_len,
25194                             size_t *consumed, void *arg);
25195       void *crypto_send_cb_arg;
25196   
25197   
25198   
25199   
25200   
25201   
25202       int (*crypto_recv_rcd_cb)(const unsigned char **buf, size_t *bytes_read,
25203                                 void *arg);
25204       void *crypto_recv_rcd_cb_arg;
25205       int (*crypto_release_rcd_cb)(size_t bytes_read, void *arg);
25206       void *crypto_release_rcd_cb_arg;
25207   
25208   
25209   
25210       int (*yield_secret_cb)(uint32_t enc_level, int direction ,
25211                              uint32_t suite_id, EVP_MD *md,
25212                              const unsigned char *secret, size_t secret_len,
25213                              void *arg);
25214       void *yield_secret_cb_arg;
25215   
25216   
25217   
25218   
25219   
25220   
25221   
25222       int (*got_transport_params_cb)(const unsigned char *params,
25223                                      size_t params_len,
25224                                      void *arg);
25225       void *got_transport_params_cb_arg;
25226   
25227   
25228   
25229   
25230   
25231   
25232       int (*handshake_complete_cb)(void *arg);
25233       void *handshake_complete_cb_arg;
25234   
25235   
25236   
25237   
25238   
25239   
25240   
25241       int (*alert_cb)(void *arg, unsigned char alert_code);
25242       void *alert_cb_arg;
25243   
25244   
25245       int is_server;
25246   } QUIC_TLS_ARGS;
25247   
25248   QUIC_TLS *ossl_quic_tls_new(const QUIC_TLS_ARGS *args);
25249   
25250   void ossl_quic_tls_free(QUIC_TLS *qtls);
25251   
25252   
25253   int ossl_quic_tls_tick(QUIC_TLS *qtls);
25254   
25255   int ossl_quic_tls_set_transport_params(QUIC_TLS *qtls,
25256                                          const unsigned char *transport_params,
25257                                          size_t transport_params_len);
25258   
25259   int ossl_quic_tls_get_error(QUIC_TLS *qtls,
25260                               uint64_t *error_code,
25261                               const char **error_msg,
25262                               ERR_STATE **error_state);
25263   
25264   int ossl_quic_tls_is_cert_request(QUIC_TLS *qtls);
25265   int ossl_quic_tls_has_bad_max_early_data(QUIC_TLS *qtls);
25266   # 20 "ssl/quic/quic_local.h" 2
25267   
25268   
25269   
25270   # 1 "include/internal/quic_reactor.h" 1
25271   # 72 "include/internal/quic_reactor.h"
25272   struct quic_tick_result_st {
25273       char net_read_desired;
25274       char net_write_desired;
25275       OSSL_TIME tick_deadline;
25276   };
25277   
25278   static inline __attribute__((unused)) void
25279   ossl_quic_tick_result_merge_into(QUIC_TICK_RESULT *r,
25280                                    const QUIC_TICK_RESULT *src)
25281   {
25282       r->net_read_desired = r->net_read_desired || src->net_read_desired;
25283       r->net_write_desired = r->net_write_desired || src->net_write_desired;
25284       r->tick_deadline = ossl_time_min(r->tick_deadline, src->tick_deadline);
25285   }
25286   
25287   struct quic_reactor_st {
25288   # 96 "include/internal/quic_reactor.h"
25289       BIO_POLL_DESCRIPTOR poll_r, poll_w;
25290       OSSL_TIME tick_deadline;
25291   
25292       void (*tick_cb)(QUIC_TICK_RESULT *res, void *arg, uint32_t flags);
25293       void *tick_cb_arg;
25294   
25295   
25296   
25297   
25298   
25299       unsigned int net_read_desired : 1;
25300       unsigned int net_write_desired : 1;
25301   
25302   
25303   
25304   
25305   
25306       unsigned int can_poll_r : 1;
25307       unsigned int can_poll_w : 1;
25308   };
25309   
25310   void ossl_quic_reactor_init(QUIC_REACTOR *rtor,
25311                               void (*tick_cb)(QUIC_TICK_RESULT *res, void *arg,
25312                                               uint32_t flags),
25313                               void *tick_cb_arg,
25314                               OSSL_TIME initial_tick_deadline);
25315   
25316   void ossl_quic_reactor_set_poll_r(QUIC_REACTOR *rtor,
25317                                     const BIO_POLL_DESCRIPTOR *r);
25318   
25319   void ossl_quic_reactor_set_poll_w(QUIC_REACTOR *rtor,
25320                                     const BIO_POLL_DESCRIPTOR *w);
25321   
25322   const BIO_POLL_DESCRIPTOR *ossl_quic_reactor_get_poll_r(const QUIC_REACTOR *rtor);
25323   const BIO_POLL_DESCRIPTOR *ossl_quic_reactor_get_poll_w(const QUIC_REACTOR *rtor);
25324   
25325   int ossl_quic_reactor_can_poll_r(const QUIC_REACTOR *rtor);
25326   int ossl_quic_reactor_can_poll_w(const QUIC_REACTOR *rtor);
25327   
25328   int ossl_quic_reactor_can_support_poll_descriptor(const QUIC_REACTOR *rtor,
25329                                                     const BIO_POLL_DESCRIPTOR *d);
25330   
25331   int ossl_quic_reactor_net_read_desired(QUIC_REACTOR *rtor);
25332   int ossl_quic_reactor_net_write_desired(QUIC_REACTOR *rtor);
25333   
25334   OSSL_TIME ossl_quic_reactor_get_tick_deadline(QUIC_REACTOR *rtor);
25335   # 153 "include/internal/quic_reactor.h"
25336   int ossl_quic_reactor_tick(QUIC_REACTOR *rtor, uint32_t flags);
25337   # 192 "include/internal/quic_reactor.h"
25338   int ossl_quic_reactor_block_until_pred(QUIC_REACTOR *rtor,
25339                                          int (*pred)(void *arg), void *pred_arg,
25340                                          uint32_t flags,
25341                                          CRYPTO_MUTEX *mutex);
25342   # 24 "ssl/quic/quic_local.h" 2
25343   # 1 "include/internal/quic_thread_assist.h" 1
25344   # 45 "include/internal/quic_thread_assist.h"
25345   typedef struct quic_thread_assist_st {
25346       QUIC_CHANNEL *ch;
25347       CRYPTO_CONDVAR *cv;
25348       CRYPTO_THREAD *t;
25349       int teardown, joined;
25350       OSSL_TIME (*now_cb)(void *arg);
25351       void *now_cb_arg;
25352   } QUIC_THREAD_ASSIST;
25353   
25354   
25355   
25356   
25357   
25358   
25359   
25360   int ossl_quic_thread_assist_init_start(QUIC_THREAD_ASSIST *qta,
25361                                          QUIC_CHANNEL *ch,
25362                                          OSSL_TIME (*now_cb)(void *arg),
25363                                          void *now_cb_arg);
25364   # 72 "include/internal/quic_thread_assist.h"
25365   int ossl_quic_thread_assist_stop_async(QUIC_THREAD_ASSIST *qta);
25366   # 81 "include/internal/quic_thread_assist.h"
25367   int ossl_quic_thread_assist_wait_stopped(QUIC_THREAD_ASSIST *qta);
25368   # 91 "include/internal/quic_thread_assist.h"
25369   int ossl_quic_thread_assist_cleanup(QUIC_THREAD_ASSIST *qta);
25370   
25371   
25372   
25373   
25374   
25375   
25376   int ossl_quic_thread_assist_notify_deadline_changed(QUIC_THREAD_ASSIST *qta);
25377   # 25 "ssl/quic/quic_local.h" 2
25378   # 1 "ssl/quic/../ssl_local.h" 1
25379   # 26 "ssl/quic/quic_local.h" 2
25380   # 34 "ssl/quic/quic_local.h"
25381   struct quic_xso_st {
25382   
25383       struct ssl_st ssl;
25384   
25385   
25386       QUIC_CONNECTION *conn;
25387   
25388   
25389       QUIC_STREAM *stream;
25390   
25391   
25392   
25393   
25394   
25395   
25396       unsigned int desires_blocking : 1;
25397   
25398   
25399   
25400   
25401   
25402       unsigned int desires_blocking_set : 1;
25403   
25404   
25405       unsigned int retired_fin : 1;
25406   
25407   
25408   
25409   
25410   
25411       unsigned int requested_reset : 1;
25412   # 85 "ssl/quic/quic_local.h"
25413       unsigned int aon_write_in_progress : 1;
25414   
25415   
25416       unsigned int event_handling_mode : 2;
25417   # 99 "ssl/quic/quic_local.h"
25418       const unsigned char *aon_buf_base;
25419   
25420       size_t aon_buf_len;
25421   
25422   
25423   
25424   
25425       size_t aon_buf_pos;
25426   
25427   
25428       uint32_t ssl_mode;
25429   
25430   
25431       uint64_t ssl_options;
25432   
25433   
25434   
25435   
25436   
25437   
25438       int last_error;
25439   };
25440   
25441   struct quic_conn_st {
25442   
25443   
25444   
25445   
25446   
25447   
25448   
25449       struct ssl_st ssl;
25450   
25451       SSL *tls;
25452   
25453   
25454       QUIC_ENGINE *engine;
25455   
25456   
25457       QUIC_PORT *port;
25458   # 151 "ssl/quic/quic_local.h"
25459       QUIC_CHANNEL *ch;
25460   
25461   
25462   
25463   
25464   
25465       CRYPTO_MUTEX *mutex;
25466   
25467   
25468   
25469   
25470   
25471       QUIC_XSO *default_xso;
25472   
25473   
25474       BIO *net_rbio, *net_wbio;
25475   
25476   
25477       BIO_ADDR init_peer_addr;
25478   
25479   
25480   
25481       QUIC_THREAD_ASSIST thread_assist;
25482   
25483   
25484   
25485       OSSL_TIME (*override_now_cb)(void *arg);
25486       void *override_now_cb_arg;
25487   
25488   
25489       size_t num_xso;
25490   
25491   
25492       unsigned int started : 1;
25493   
25494   
25495   
25496   
25497   
25498       unsigned int as_server : 1;
25499   
25500   
25501   
25502   
25503   
25504       unsigned int as_server_state : 1;
25505   
25506   
25507       unsigned int is_thread_assisted : 1;
25508   
25509   
25510       unsigned int blocking : 1;
25511   
25512   
25513       unsigned int desires_blocking : 1;
25514   
25515   
25516       unsigned int default_xso_created : 1;
25517   
25518   
25519   
25520   
25521   
25522   
25523       unsigned int shutting_down : 1;
25524   
25525   
25526       unsigned int addressing_probe_done : 1;
25527   
25528   
25529       unsigned int addressed_mode_w : 1;
25530       unsigned int addressed_mode_r : 1;
25531   
25532   
25533       unsigned int event_handling_mode : 2;
25534   
25535   
25536       uint32_t default_stream_mode;
25537   
25538   
25539       uint32_t default_ssl_mode;
25540   
25541   
25542       uint64_t default_ssl_options;
25543   
25544   
25545       int incoming_stream_policy;
25546       uint64_t incoming_stream_aec;
25547   
25548   
25549   
25550   
25551   
25552   
25553       int last_error;
25554   };
25555   
25556   
25557   int ossl_quic_conn_on_handshake_confirmed(QUIC_CONNECTION *qc);
25558   
25559   
25560   
25561   
25562   
25563   
25564   
25565   void ossl_quic_conn_raise_protocol_error(QUIC_CONNECTION *qc,
25566                                            uint64_t error_code,
25567                                            uint64_t frame_type,
25568                                            const char *reason);
25569   
25570   void ossl_quic_conn_on_remote_conn_close(QUIC_CONNECTION *qc,
25571                                            OSSL_QUIC_FRAME_CONN_CLOSE *f);
25572   
25573   int ossl_quic_trace(int write_p, int version, int content_type,
25574                       const void *buf, size_t msglen, SSL *ssl, void *arg);
25575   # 1827 "ssl/ssl_local.h" 2
25576   # 1849 "ssl/ssl_local.h"
25577   typedef struct sigalg_lookup_st {
25578   
25579       const char *name;
25580   
25581       uint16_t sigalg;
25582   
25583       int hash;
25584   
25585       int hash_idx;
25586   
25587       int sig;
25588   
25589       int sig_idx;
25590   
25591       int sigandhash;
25592   
25593       int curve;
25594   
25595       int enabled;
25596   } SIGALG_LOOKUP;
25597   # 1885 "ssl/ssl_local.h"
25598   struct dtls1_retransmit_state {
25599       const OSSL_RECORD_METHOD *wrlmethod;
25600       OSSL_RECORD_LAYER *wrl;
25601   };
25602   
25603   struct hm_header_st {
25604       unsigned char type;
25605       size_t msg_len;
25606       unsigned short seq;
25607       size_t frag_off;
25608       size_t frag_len;
25609       unsigned int is_ccs;
25610       struct dtls1_retransmit_state saved_retransmit_state;
25611   };
25612   
25613   typedef struct hm_fragment_st {
25614       struct hm_header_st msg_header;
25615       unsigned char *fragment;
25616       unsigned char *reassembly;
25617   } hm_fragment;
25618   
25619   typedef struct pqueue_st pqueue;
25620   typedef struct pitem_st pitem;
25621   
25622   struct pitem_st {
25623       unsigned char priority[8];
25624       void *data;
25625       pitem *next;
25626   };
25627   
25628   typedef struct pitem_st *piterator;
25629   
25630   pitem *pitem_new(unsigned char *prio64be, void *data);
25631   void pitem_free(pitem *item);
25632   pqueue *pqueue_new(void);
25633   void pqueue_free(pqueue *pq);
25634   pitem *pqueue_insert(pqueue *pq, pitem *item);
25635   pitem *pqueue_peek(pqueue *pq);
25636   pitem *pqueue_pop(pqueue *pq);
25637   pitem *pqueue_find(pqueue *pq, unsigned char *prio64be);
25638   pitem *pqueue_iterator(pqueue *pq);
25639   pitem *pqueue_next(piterator *iter);
25640   size_t pqueue_size(pqueue *pq);
25641   
25642   typedef struct dtls1_state_st {
25643       unsigned char cookie[255];
25644       size_t cookie_len;
25645       unsigned int cookie_verified;
25646   
25647       unsigned short handshake_write_seq;
25648       unsigned short next_handshake_write_seq;
25649       unsigned short handshake_read_seq;
25650   
25651       pqueue *buffered_messages;
25652   
25653       pqueue *sent_messages;
25654       size_t link_mtu;
25655       size_t mtu;
25656       struct hm_header_st w_msg_hdr;
25657       struct hm_header_st r_msg_hdr;
25658   
25659       unsigned int timeout_num_alerts;
25660   
25661   
25662   
25663       OSSL_TIME next_timeout;
25664   
25665       unsigned int timeout_duration_us;
25666   
25667       unsigned int retransmitting;
25668   
25669   
25670   
25671   
25672       DTLS_timer_cb timer_cb;
25673   
25674   } DTLS1_STATE;
25675   # 1984 "ssl/ssl_local.h"
25676   struct cert_pkey_st {
25677       X509 *x509;
25678       EVP_PKEY *privatekey;
25679   
25680       struct stack_st_X509 *chain;
25681   
25682   
25683   
25684   
25685   
25686   
25687   
25688       unsigned char *serverinfo;
25689       size_t serverinfo_length;
25690   
25691   
25692   
25693   
25694   
25695   };
25696   
25697   
25698   
25699   
25700   
25701   
25702   typedef enum {
25703       ENDPOINT_CLIENT = 0,
25704       ENDPOINT_SERVER,
25705       ENDPOINT_BOTH
25706   } ENDPOINT;
25707   
25708   
25709   typedef struct {
25710       unsigned short ext_type;
25711       ENDPOINT role;
25712   
25713       unsigned int context;
25714   
25715   
25716   
25717   
25718       uint32_t ext_flags;
25719       SSL_custom_ext_add_cb_ex add_cb;
25720       SSL_custom_ext_free_cb_ex free_cb;
25721       void *add_arg;
25722       SSL_custom_ext_parse_cb_ex parse_cb;
25723       void *parse_arg;
25724   } custom_ext_method;
25725   # 2047 "ssl/ssl_local.h"
25726   typedef struct {
25727       custom_ext_method *meths;
25728       size_t meths_count;
25729   } custom_ext_methods;
25730   
25731   typedef struct cert_st {
25732   
25733   
25734   
25735   
25736   
25737   
25738       CERT_PKEY *key;
25739   
25740       EVP_PKEY *dh_tmp;
25741       DH *(*dh_tmp_cb) (SSL *ssl, int is_export, int keysize);
25742       int dh_tmp_auto;
25743   
25744       uint32_t cert_flags;
25745       CERT_PKEY *pkeys;
25746       size_t ssl_pkey_num;
25747   
25748       uint8_t *ctype;
25749       size_t ctype_len;
25750   
25751   
25752   
25753   
25754   
25755       uint16_t *conf_sigalgs;
25756   
25757       size_t conf_sigalgslen;
25758   
25759   
25760   
25761   
25762   
25763   
25764   
25765       uint16_t *client_sigalgs;
25766   
25767       size_t client_sigalgslen;
25768   
25769   
25770   
25771   
25772   
25773   
25774   
25775       int (*cert_cb) (SSL *ssl, void *arg);
25776       void *cert_cb_arg;
25777   
25778   
25779   
25780   
25781       X509_STORE *chain_store;
25782       X509_STORE *verify_store;
25783   
25784       custom_ext_methods custext;
25785   
25786       int (*sec_cb) (const SSL *s, const SSL_CTX *ctx, int op, int bits, int nid,
25787                      void *other, void *ex);
25788   
25789       int sec_level;
25790       void *sec_ex;
25791   
25792   
25793       char *psk_identity_hint;
25794   
25795       CRYPTO_REF_COUNT references;
25796   } CERT;
25797   
25798   
25799   
25800   
25801   
25802   
25803   
25804   typedef struct ssl3_enc_method {
25805       int (*setup_key_block) (SSL_CONNECTION *);
25806       int (*generate_master_secret) (SSL_CONNECTION *, unsigned char *,
25807                                      unsigned char *, size_t, size_t *);
25808       int (*change_cipher_state) (SSL_CONNECTION *, int);
25809       size_t (*final_finish_mac) (SSL_CONNECTION *, const char *, size_t,
25810                                   unsigned char *);
25811       const char *client_finished_label;
25812       size_t client_finished_label_len;
25813       const char *server_finished_label;
25814       size_t server_finished_label_len;
25815       int (*alert_value) (int);
25816       int (*export_keying_material) (SSL_CONNECTION *, unsigned char *, size_t,
25817                                      const char *, size_t,
25818                                      const unsigned char *, size_t,
25819                                      int use_context);
25820   
25821       uint32_t enc_flags;
25822   
25823       int (*set_handshake_header) (SSL_CONNECTION *s, WPACKET *pkt, int type);
25824   
25825       int (*close_construct_packet) (SSL_CONNECTION *s, WPACKET *pkt, int htype);
25826   
25827       int (*do_write) (SSL_CONNECTION *s);
25828   } SSL3_ENC_METHOD;
25829   # 2173 "ssl/ssl_local.h"
25830   typedef enum downgrade_en {
25831       DOWNGRADE_NONE,
25832       DOWNGRADE_TO_1_2,
25833       DOWNGRADE_TO_1_1
25834   } DOWNGRADE;
25835   # 2237 "ssl/ssl_local.h"
25836   extern const unsigned char tls11downgrade[8];
25837   extern const unsigned char tls12downgrade[8];
25838   
25839   extern const SSL3_ENC_METHOD ssl3_undef_enc_method;
25840   
25841    const SSL_METHOD *sslv3_method(void);
25842    const SSL_METHOD *sslv3_server_method(void);
25843    const SSL_METHOD *sslv3_client_method(void);
25844    const SSL_METHOD *tlsv1_method(void);
25845    const SSL_METHOD *tlsv1_server_method(void);
25846    const SSL_METHOD *tlsv1_client_method(void);
25847    const SSL_METHOD *tlsv1_1_method(void);
25848    const SSL_METHOD *tlsv1_1_server_method(void);
25849    const SSL_METHOD *tlsv1_1_client_method(void);
25850    const SSL_METHOD *tlsv1_2_method(void);
25851    const SSL_METHOD *tlsv1_2_server_method(void);
25852    const SSL_METHOD *tlsv1_2_client_method(void);
25853    const SSL_METHOD *tlsv1_3_method(void);
25854    const SSL_METHOD *tlsv1_3_server_method(void);
25855    const SSL_METHOD *tlsv1_3_client_method(void);
25856    const SSL_METHOD *dtlsv1_method(void);
25857    const SSL_METHOD *dtlsv1_server_method(void);
25858    const SSL_METHOD *dtlsv1_client_method(void);
25859    const SSL_METHOD *dtls_bad_ver_client_method(void);
25860    const SSL_METHOD *dtlsv1_2_method(void);
25861    const SSL_METHOD *dtlsv1_2_server_method(void);
25862    const SSL_METHOD *dtlsv1_2_client_method(void);
25863   
25864   extern const SSL3_ENC_METHOD TLSv1_enc_data;
25865   extern const SSL3_ENC_METHOD TLSv1_1_enc_data;
25866   extern const SSL3_ENC_METHOD TLSv1_2_enc_data;
25867   extern const SSL3_ENC_METHOD TLSv1_3_enc_data;
25868   extern const SSL3_ENC_METHOD SSLv3_enc_data;
25869   extern const SSL3_ENC_METHOD DTLSv1_enc_data;
25870   extern const SSL3_ENC_METHOD DTLSv1_2_enc_data;
25871   # 2401 "ssl/ssl_local.h"
25872   struct openssl_ssl_test_functions {
25873       int (*p_ssl_init_wbio_buffer) (SSL_CONNECTION *s);
25874   };
25875   
25876   const char *ssl_protocol_to_string(int version);
25877   
25878   static inline int tls12_rpk_and_privkey(const SSL_CONNECTION *sc, int idx)
25879   {
25880   
25881   
25882   
25883   
25884       return ((sc->server && sc->ext.server_cert_type == 2)
25885               || (!sc->server && sc->ext.client_cert_type == 2))
25886           && sc->cert->pkeys[idx].privatekey != 
25887   # 2415 "ssl/ssl_local.h" 3 4
25888                                                ((void *)0)
25889           
25890   # 2416 "ssl/ssl_local.h"
25891          && sc->cert->pkeys[idx].x509 == 
25892   # 2416 "ssl/ssl_local.h" 3 4
25893                                          ((void *)0)
25894   # 2416 "ssl/ssl_local.h"
25895                                              ;
25896   }
25897   
25898   static inline int ssl_has_cert_type(const SSL_CONNECTION *sc, unsigned char ct)
25899   {
25900       unsigned char *ptr;
25901       size_t len;
25902   
25903       if (sc->server) {
25904           ptr = sc->server_cert_type;
25905           len = sc->server_cert_type_len;
25906       } else {
25907           ptr = sc->client_cert_type;
25908           len = sc->client_cert_type_len;
25909       }
25910   
25911       if (ptr == 
25912   # 2432 "ssl/ssl_local.h" 3 4
25913                 ((void *)0)
25914   # 2432 "ssl/ssl_local.h"
25915                     )
25916           return 0;
25917   
25918       return memchr(ptr, ct, len) != 
25919   # 2435 "ssl/ssl_local.h" 3 4
25920                                     ((void *)0)
25921   # 2435 "ssl/ssl_local.h"
25922                                         ;
25923   }
25924   
25925   
25926   static inline int ssl_has_cert(const SSL_CONNECTION *s, int idx)
25927   {
25928       if (idx < 0 || idx >= (int)s->ssl_pkey_num)
25929           return 0;
25930   
25931   
25932       if (ssl_has_cert_type(s, 2))
25933           return s->cert->pkeys[idx].privatekey != 
25934   # 2446 "ssl/ssl_local.h" 3 4
25935                                                   ((void *)0)
25936   # 2446 "ssl/ssl_local.h"
25937                                                       ;
25938   
25939       return s->cert->pkeys[idx].x509 != 
25940   # 2448 "ssl/ssl_local.h" 3 4
25941                                         ((void *)0)
25942           
25943   # 2449 "ssl/ssl_local.h"
25944          && s->cert->pkeys[idx].privatekey != 
25945   # 2449 "ssl/ssl_local.h" 3 4
25946                                               ((void *)0)
25947   # 2449 "ssl/ssl_local.h"
25948                                                   ;
25949   }
25950   
25951   static inline void tls1_get_peer_groups(SSL_CONNECTION *s,
25952                                                const uint16_t **pgroups,
25953                                                size_t *pgroupslen)
25954   {
25955       *pgroups = s->ext.peer_supportedgroups;
25956       *pgroupslen = s->ext.peer_supportedgroups_len;
25957   }
25958   
25959   
25960   
25961    int ossl_ssl_init(SSL *ssl, SSL_CTX *ctx, const SSL_METHOD *method,
25962                            int type);
25963    SSL *ossl_ssl_connection_new_int(SSL_CTX *ctx, const SSL_METHOD *method);
25964    SSL *ossl_ssl_connection_new(SSL_CTX *ctx);
25965   void ossl_ssl_connection_free(SSL *ssl);
25966    int ossl_ssl_connection_reset(SSL *ssl);
25967   
25968    int ssl_read_internal(SSL *s, void *buf, size_t num, size_t *readbytes);
25969    int ssl_write_internal(SSL *s, const void *buf, size_t num,
25970                                 uint64_t flags, size_t *written);
25971   int ssl_clear_bad_session(SSL_CONNECTION *s);
25972    CERT *ssl_cert_new(size_t ssl_pkey_num);
25973    CERT *ssl_cert_dup(CERT *cert);
25974   void ssl_cert_clear_certs(CERT *c);
25975   void ssl_cert_free(CERT *c);
25976    int ssl_generate_session_id(SSL_CONNECTION *s, SSL_SESSION *ss);
25977    int ssl_get_new_session(SSL_CONNECTION *s, int session);
25978    SSL_SESSION *lookup_sess_in_cache(SSL_CONNECTION *s,
25979                                            const unsigned char *sess_id,
25980                                            size_t sess_id_len);
25981    int ssl_get_prev_session(SSL_CONNECTION *s, CLIENTHELLO_MSG *hello);
25982    SSL_SESSION *ssl_session_dup(const SSL_SESSION *src, int ticket);
25983    int ssl_cipher_id_cmp(const SSL_CIPHER *a, const SSL_CIPHER *b);
25984   SSL_CIPHER * OBJ_bsearch_ssl_cipher_id(SSL_CIPHER *key, SSL_CIPHER const *base, int num);
25985    int ssl_cipher_ptr_id_cmp(const SSL_CIPHER *const *ap,
25986                                    const SSL_CIPHER *const *bp);
25987    struct stack_st_SSL_CIPHER *ssl_create_cipher_list(SSL_CTX *ctx,
25988                                                       struct stack_st_SSL_CIPHER *tls13_ciphersuites,
25989                                                       struct stack_st_SSL_CIPHER **cipher_list,
25990                                                       struct stack_st_SSL_CIPHER **cipher_list_by_id,
25991                                                       const char *rule_str,
25992                                                       CERT *c);
25993    int ssl_cache_cipherlist(SSL_CONNECTION *s, PACKET *cipher_suites,
25994                                   int sslv2format);
25995    int ossl_bytes_to_cipher_list(SSL_CONNECTION *s, PACKET *cipher_suites,
25996                                        struct stack_st_SSL_CIPHER **skp,
25997                                        struct stack_st_SSL_CIPHER **scsvs, int sslv2format,
25998                                        int fatal);
25999   void ssl_update_cache(SSL_CONNECTION *s, int mode);
26000    int ssl_cipher_get_evp_cipher(SSL_CTX *ctx, const SSL_CIPHER *sslc,
26001                                        const EVP_CIPHER **enc);
26002    int ssl_cipher_get_evp(SSL_CTX *ctxc, const SSL_SESSION *s,
26003                                 const EVP_CIPHER **enc, const EVP_MD **md,
26004                                 int *mac_pkey_type, size_t *mac_secret_size,
26005                                 SSL_COMP **comp, int use_etm);
26006    int ssl_cipher_get_overhead(const SSL_CIPHER *c, size_t *mac_overhead,
26007                                      size_t *int_overhead, size_t *blocksize,
26008                                      size_t *ext_overhead);
26009    int ssl_cert_is_disabled(SSL_CTX *ctx, size_t idx);
26010    const SSL_CIPHER *ssl_get_cipher_by_char(SSL_CONNECTION *ssl,
26011                                                   const unsigned char *ptr,
26012                                                   int all);
26013    int ssl_cert_set0_chain(SSL_CONNECTION *s, SSL_CTX *ctx,
26014                                  struct stack_st_X509 *chain);
26015    int ssl_cert_set1_chain(SSL_CONNECTION *s, SSL_CTX *ctx,
26016                                  struct stack_st_X509 *chain);
26017    int ssl_cert_add0_chain_cert(SSL_CONNECTION *s, SSL_CTX *ctx, X509 *x);
26018    int ssl_cert_add1_chain_cert(SSL_CONNECTION *s, SSL_CTX *ctx, X509 *x);
26019    int ssl_cert_select_current(CERT *c, X509 *x);
26020    int ssl_cert_set_current(CERT *c, long arg);
26021   void ssl_cert_set_cert_cb(CERT *c, int (*cb) (SSL *ssl, void *arg), void *arg);
26022   
26023    int ssl_verify_cert_chain(SSL_CONNECTION *s, struct stack_st_X509 *sk);
26024    int ssl_verify_rpk(SSL_CONNECTION *s, EVP_PKEY *rpk);
26025    int ssl_build_cert_chain(SSL_CONNECTION *s, SSL_CTX *ctx, int flags);
26026    int ssl_cert_set_cert_store(CERT *c, X509_STORE *store, int chain,
26027                                      int ref);
26028    int ssl_cert_get_cert_store(CERT *c, X509_STORE **pstore, int chain);
26029   
26030    int ssl_security(const SSL_CONNECTION *s, int op, int bits, int nid,
26031                           void *other);
26032    int ssl_ctx_security(const SSL_CTX *ctx, int op, int bits, int nid,
26033                               void *other);
26034   int ssl_get_security_level_bits(const SSL *s, const SSL_CTX *ctx, int *levelp);
26035   
26036    int ssl_cert_lookup_by_nid(int nid, size_t *pidx, SSL_CTX *ctx);
26037    const SSL_CERT_LOOKUP *ssl_cert_lookup_by_pkey(const EVP_PKEY *pk,
26038                                                         size_t *pidx,
26039                                                         SSL_CTX *ctx);
26040    const SSL_CERT_LOOKUP *ssl_cert_lookup_by_idx(size_t idx, SSL_CTX *ctx);
26041   
26042   int ssl_undefined_function(SSL *s);
26043    int ssl_undefined_void_function(void);
26044    int ssl_undefined_const_function(const SSL *s);
26045    int ssl_get_server_cert_serverinfo(SSL_CONNECTION *s,
26046                                             const unsigned char **serverinfo,
26047                                             size_t *serverinfo_length);
26048   void ssl_set_masks(SSL_CONNECTION *s);
26049    struct stack_st_SSL_CIPHER *ssl_get_ciphers_by_id(SSL_CONNECTION *sc);
26050    int ssl_x509err2alert(int type);
26051   void ssl_sort_cipher_list(void);
26052   int ssl_load_ciphers(SSL_CTX *ctx);
26053    int ssl_setup_sigalgs(SSL_CTX *ctx);
26054   int ssl_load_groups(SSL_CTX *ctx);
26055   int ssl_load_sigalgs(SSL_CTX *ctx);
26056    int ssl_fill_hello_random(SSL_CONNECTION *s, int server,
26057                                    unsigned char *field, size_t len,
26058                                    DOWNGRADE dgrd);
26059    int ssl_generate_master_secret(SSL_CONNECTION *s, unsigned char *pms,
26060                                         size_t pmslen, int free_pms);
26061    EVP_PKEY *ssl_generate_pkey(SSL_CONNECTION *s, EVP_PKEY *pm);
26062    int ssl_gensecret(SSL_CONNECTION *s, unsigned char *pms, size_t pmslen);
26063    int ssl_derive(SSL_CONNECTION *s, EVP_PKEY *privkey, EVP_PKEY *pubkey,
26064                         int genmaster);
26065    int ssl_decapsulate(SSL_CONNECTION *s, EVP_PKEY *privkey,
26066                              const unsigned char *ct, size_t ctlen,
26067                              int gensecret);
26068    int ssl_encapsulate(SSL_CONNECTION *s, EVP_PKEY *pubkey,
26069                              unsigned char **ctp, size_t *ctlenp,
26070                              int gensecret);
26071    EVP_PKEY *ssl_dh_to_pkey(DH *dh);
26072    int ssl_set_tmp_ecdh_groups(uint16_t **pext, size_t *pextlen,
26073                                      void *key);
26074    unsigned int ssl_get_max_send_fragment(const SSL_CONNECTION *sc);
26075    unsigned int ssl_get_split_send_fragment(const SSL_CONNECTION *sc);
26076   
26077    const SSL_CIPHER *ssl3_get_cipher_by_id(uint32_t id);
26078    const SSL_CIPHER *ssl3_get_cipher_by_std_name(const char *stdname);
26079    const SSL_CIPHER *ssl3_get_cipher_by_char(const unsigned char *p);
26080    int ssl3_put_cipher_by_char(const SSL_CIPHER *c, WPACKET *pkt,
26081                                      size_t *len);
26082   int ssl3_init_finished_mac(SSL_CONNECTION *s);
26083    int ssl3_setup_key_block(SSL_CONNECTION *s);
26084    int ssl3_change_cipher_state(SSL_CONNECTION *s, int which);
26085   void ssl3_cleanup_key_block(SSL_CONNECTION *s);
26086    int ssl3_do_write(SSL_CONNECTION *s, uint8_t type);
26087   int ssl3_send_alert(SSL_CONNECTION *s, int level, int desc);
26088    int ssl3_generate_master_secret(SSL_CONNECTION *s, unsigned char *out,
26089                                          unsigned char *p, size_t len,
26090                                          size_t *secret_size);
26091    int ssl3_get_req_cert_type(SSL_CONNECTION *s, WPACKET *pkt);
26092    int ssl3_num_ciphers(void);
26093    const SSL_CIPHER *ssl3_get_cipher(unsigned int u);
26094   int ssl3_renegotiate(SSL *ssl);
26095   int ssl3_renegotiate_check(SSL *ssl, int initok);
26096   void ssl3_digest_master_key_set_params(const SSL_SESSION *session,
26097                                          OSSL_PARAM params[]);
26098    int ssl3_dispatch_alert(SSL *s);
26099    size_t ssl3_final_finish_mac(SSL_CONNECTION *s, const char *sender,
26100                                       size_t slen, unsigned char *p);
26101    int ssl3_finish_mac(SSL_CONNECTION *s, const unsigned char *buf,
26102                              size_t len);
26103   void ssl3_free_digest_list(SSL_CONNECTION *s);
26104    unsigned long ssl3_output_cert_chain(SSL_CONNECTION *s, WPACKET *pkt,
26105                                               CERT_PKEY *cpk, int for_comp);
26106    const SSL_CIPHER *ssl3_choose_cipher(SSL_CONNECTION *s,
26107                                               struct stack_st_SSL_CIPHER *clnt,
26108                                               struct stack_st_SSL_CIPHER *srvr);
26109    int ssl3_digest_cached_records(SSL_CONNECTION *s, int keep);
26110    int ssl3_new(SSL *s);
26111   void ssl3_free(SSL *s);
26112    int ssl3_read(SSL *s, void *buf, size_t len, size_t *readbytes);
26113    int ssl3_peek(SSL *s, void *buf, size_t len, size_t *readbytes);
26114    int ssl3_write(SSL *s, const void *buf, size_t len, size_t *written);
26115    int ssl3_shutdown(SSL *s);
26116   int ssl3_clear(SSL *s);
26117    long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg);
26118    long ssl3_ctx_ctrl(SSL_CTX *s, int cmd, long larg, void *parg);
26119    long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp) (void));
26120    long ssl3_ctx_callback_ctrl(SSL_CTX *s, int cmd, void (*fp) (void));
26121   
26122    int ssl3_do_change_cipher_spec(SSL_CONNECTION *s);
26123    OSSL_TIME ssl3_default_timeout(void);
26124   
26125    int ssl3_set_handshake_header(SSL_CONNECTION *s, WPACKET *pkt,
26126                                        int htype);
26127    int tls_close_construct_packet(SSL_CONNECTION *s, WPACKET *pkt, int htype);
26128    int tls_setup_handshake(SSL_CONNECTION *s);
26129    int dtls1_set_handshake_header(SSL_CONNECTION *s, WPACKET *pkt, int htype);
26130    int dtls1_close_construct_packet(SSL_CONNECTION *s, WPACKET *pkt, int htype);
26131    int ssl3_handshake_write(SSL_CONNECTION *s);
26132   
26133    int ssl_allow_compression(SSL_CONNECTION *s);
26134   
26135    int ssl_version_cmp(const SSL_CONNECTION *s, int versiona, int versionb);
26136    int ssl_version_supported(const SSL_CONNECTION *s, int version,
26137                                    const SSL_METHOD **meth);
26138   
26139    int ssl_set_client_hello_version(SSL_CONNECTION *s);
26140    int ssl_check_version_downgrade(SSL_CONNECTION *s);
26141    int ssl_set_version_bound(int method_version, int version, int *bound);
26142    int ssl_choose_server_version(SSL_CONNECTION *s, CLIENTHELLO_MSG *hello,
26143                                        DOWNGRADE *dgrd);
26144    int ssl_choose_client_version(SSL_CONNECTION *s, int version,
26145                                        RAW_EXTENSION *extensions);
26146    int ssl_get_min_max_version(const SSL_CONNECTION *s, int *min_version,
26147                                      int *max_version, int *real_max);
26148   
26149    OSSL_TIME tls1_default_timeout(void);
26150    int dtls1_do_write(SSL_CONNECTION *s, uint8_t type);
26151   void dtls1_set_message_header(SSL_CONNECTION *s,
26152                                 unsigned char mt,
26153                                 size_t len,
26154                                 size_t frag_off, size_t frag_len);
26155   
26156   int dtls1_write_app_data_bytes(SSL *s, uint8_t type, const void *buf_,
26157                                  size_t len, size_t *written);
26158   
26159    int dtls1_read_failed(SSL_CONNECTION *s, int code);
26160    int dtls1_buffer_message(SSL_CONNECTION *s, int ccs);
26161    int dtls1_retransmit_message(SSL_CONNECTION *s, unsigned short seq,
26162                                       int *found);
26163    int dtls1_get_queue_priority(unsigned short seq, int is_ccs);
26164   int dtls1_retransmit_buffered_messages(SSL_CONNECTION *s);
26165   void dtls1_clear_received_buffer(SSL_CONNECTION *s);
26166   void dtls1_clear_sent_buffer(SSL_CONNECTION *s);
26167   void dtls1_get_message_header(const unsigned char *data,
26168                                 struct hm_header_st *msg_hdr);
26169    OSSL_TIME dtls1_default_timeout(void);
26170    int dtls1_get_timeout(const SSL_CONNECTION *s, OSSL_TIME *timeleft);
26171    int dtls1_check_timeout_num(SSL_CONNECTION *s);
26172    int dtls1_handle_timeout(SSL_CONNECTION *s);
26173   void dtls1_start_timer(SSL_CONNECTION *s);
26174   void dtls1_stop_timer(SSL_CONNECTION *s);
26175    int dtls1_is_timer_expired(SSL_CONNECTION *s);
26176    int dtls_raw_hello_verify_request(WPACKET *pkt, unsigned char *cookie,
26177                                            size_t cookie_len);
26178    size_t dtls1_min_mtu(SSL_CONNECTION *s);
26179   void dtls1_hm_fragment_free(hm_fragment *frag);
26180    int dtls1_query_mtu(SSL_CONNECTION *s);
26181   
26182    int tls1_new(SSL *s);
26183   void tls1_free(SSL *s);
26184   int tls1_clear(SSL *s);
26185   
26186    int dtls1_new(SSL *s);
26187   void dtls1_free(SSL *s);
26188   int dtls1_clear(SSL *s);
26189   long dtls1_ctrl(SSL *s, int cmd, long larg, void *parg);
26190    int dtls1_shutdown(SSL *s);
26191   
26192    int dtls1_dispatch_alert(SSL *s);
26193   
26194    int ssl_init_wbio_buffer(SSL_CONNECTION *s);
26195   int ssl_free_wbio_buffer(SSL_CONNECTION *s);
26196   
26197    int tls1_change_cipher_state(SSL_CONNECTION *s, int which);
26198    int tls1_setup_key_block(SSL_CONNECTION *s);
26199    size_t tls1_final_finish_mac(SSL_CONNECTION *s, const char *str,
26200                                       size_t slen, unsigned char *p);
26201    int tls1_generate_master_secret(SSL_CONNECTION *s, unsigned char *out,
26202                                          unsigned char *p, size_t len,
26203                                          size_t *secret_size);
26204    int tls13_setup_key_block(SSL_CONNECTION *s);
26205    size_t tls13_final_finish_mac(SSL_CONNECTION *s, const char *str, size_t slen,
26206                                        unsigned char *p);
26207    int tls13_change_cipher_state(SSL_CONNECTION *s, int which);
26208    int tls13_update_key(SSL_CONNECTION *s, int send);
26209    int tls13_hkdf_expand(SSL_CONNECTION *s,
26210                                const EVP_MD *md,
26211                                const unsigned char *secret,
26212                                const unsigned char *label, size_t labellen,
26213                                const unsigned char *data, size_t datalen,
26214                                unsigned char *out, size_t outlen, int fatal);
26215    int tls13_hkdf_expand_ex(OSSL_LIB_CTX *libctx, const char *propq,
26216                                   const EVP_MD *md,
26217                                   const unsigned char *secret,
26218                                   const unsigned char *label, size_t labellen,
26219                                   const unsigned char *data, size_t datalen,
26220                                   unsigned char *out, size_t outlen,
26221                                   int raise_error);
26222    int tls13_derive_key(SSL_CONNECTION *s, const EVP_MD *md,
26223                               const unsigned char *secret, unsigned char *key,
26224                               size_t keylen);
26225    int tls13_derive_iv(SSL_CONNECTION *s, const EVP_MD *md,
26226                              const unsigned char *secret, unsigned char *iv,
26227                              size_t ivlen);
26228    int tls13_derive_finishedkey(SSL_CONNECTION *s, const EVP_MD *md,
26229                                       const unsigned char *secret,
26230                                       unsigned char *fin, size_t finlen);
26231   int tls13_generate_secret(SSL_CONNECTION *s, const EVP_MD *md,
26232                             const unsigned char *prevsecret,
26233                             const unsigned char *insecret,
26234                             size_t insecretlen,
26235                             unsigned char *outsecret);
26236    int tls13_generate_handshake_secret(SSL_CONNECTION *s,
26237                                              const unsigned char *insecret,
26238                                              size_t insecretlen);
26239    int tls13_generate_master_secret(SSL_CONNECTION *s, unsigned char *out,
26240                                           unsigned char *prev, size_t prevlen,
26241                                           size_t *secret_size);
26242    int tls1_export_keying_material(SSL_CONNECTION *s,
26243                                          unsigned char *out, size_t olen,
26244                                          const char *label, size_t llen,
26245                                          const unsigned char *p, size_t plen,
26246                                          int use_context);
26247    int tls13_export_keying_material(SSL_CONNECTION *s,
26248                                           unsigned char *out, size_t olen,
26249                                           const char *label, size_t llen,
26250                                           const unsigned char *context,
26251                                           size_t contextlen, int use_context);
26252    int tls13_export_keying_material_early(SSL_CONNECTION *s,
26253                                                 unsigned char *out, size_t olen,
26254                                                 const char *label, size_t llen,
26255                                                 const unsigned char *context,
26256                                                 size_t contextlen);
26257    int tls1_alert_code(int code);
26258    int tls13_alert_code(int code);
26259    int ssl3_alert_code(int code);
26260   
26261    int ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL_CONNECTION *s);
26262   
26263   SSL_COMP *ssl3_comp_find(struct stack_st_SSL_COMP *sk, int n);
26264   
26265    const TLS_GROUP_INFO *tls1_group_id_lookup(SSL_CTX *ctx, uint16_t curve_id);
26266    const char *tls1_group_id2name(SSL_CTX *ctx, uint16_t group_id);
26267    int tls1_group_id2nid(uint16_t group_id, int include_unknown);
26268    uint16_t tls1_nid2group_id(int nid);
26269    int tls1_check_group_id(SSL_CONNECTION *s, uint16_t group_id,
26270                                  int check_own_curves);
26271    uint16_t tls1_shared_group(SSL_CONNECTION *s, int nmatch);
26272    int tls1_set_groups(uint16_t **pext, size_t *pextlen,
26273                              int *curves, size_t ncurves);
26274    int tls1_set_groups_list(SSL_CTX *ctx, uint16_t **pext, size_t *pextlen,
26275                                   const char *str);
26276    EVP_PKEY *ssl_generate_pkey_group(SSL_CONNECTION *s, uint16_t id);
26277    int tls_valid_group(SSL_CONNECTION *s, uint16_t group_id, int minversion,
26278                              int maxversion, int isec, int *okfortls13);
26279    EVP_PKEY *ssl_generate_param_group(SSL_CONNECTION *s, uint16_t id);
26280   void tls1_get_formatlist(SSL_CONNECTION *s, const unsigned char **pformats,
26281                            size_t *num_formats);
26282    int tls1_check_ec_tmp_key(SSL_CONNECTION *s, unsigned long id);
26283   
26284    int tls_group_allowed(SSL_CONNECTION *s, uint16_t curve, int op);
26285   void tls1_get_supported_groups(SSL_CONNECTION *s, const uint16_t **pgroups,
26286                                  size_t *pgroupslen);
26287   
26288    int tls1_set_server_sigalgs(SSL_CONNECTION *s);
26289   
26290    SSL_TICKET_STATUS tls_get_ticket_from_client(SSL_CONNECTION *s,
26291                                                       CLIENTHELLO_MSG *hello,
26292                                                       SSL_SESSION **ret);
26293    SSL_TICKET_STATUS tls_decrypt_ticket(SSL_CONNECTION *s,
26294                                               const unsigned char *etick,
26295                                               size_t eticklen,
26296                                               const unsigned char *sess_id,
26297                                               size_t sesslen, SSL_SESSION **psess);
26298   
26299    int tls_use_ticket(SSL_CONNECTION *s);
26300   
26301   void ssl_set_sig_mask(uint32_t *pmask_a, SSL_CONNECTION *s, int op);
26302   
26303    int tls1_set_sigalgs_list(CERT *c, const char *str, int client);
26304    int tls1_set_raw_sigalgs(CERT *c, const uint16_t *psigs, size_t salglen,
26305                                   int client);
26306    int tls1_set_sigalgs(CERT *c, const int *salg, size_t salglen,
26307                               int client);
26308   int tls1_check_chain(SSL_CONNECTION *s, X509 *x, EVP_PKEY *pk,
26309                        struct stack_st_X509 *chain, int idx);
26310   void tls1_set_cert_validity(SSL_CONNECTION *s);
26311   
26312   
26313    int ssl_validate_ct(SSL_CONNECTION *s);
26314   
26315   
26316    EVP_PKEY *ssl_get_auto_dh(SSL_CONNECTION *s);
26317   
26318    int ssl_security_cert(SSL_CONNECTION *s, SSL_CTX *ctx, X509 *x, int vfy,
26319                                int is_ee);
26320    int ssl_security_cert_chain(SSL_CONNECTION *s, struct stack_st_X509 *sk,
26321                                      X509 *ex, int vfy);
26322   
26323   int tls_choose_sigalg(SSL_CONNECTION *s, int fatalerrs);
26324   
26325    long ssl_get_algorithm2(SSL_CONNECTION *s);
26326    int tls12_copy_sigalgs(SSL_CONNECTION *s, WPACKET *pkt,
26327                                 const uint16_t *psig, size_t psiglen);
26328    int tls1_save_u16(PACKET *pkt, uint16_t **pdest, size_t *pdestlen);
26329    int tls1_save_sigalgs(SSL_CONNECTION *s, PACKET *pkt, int cert);
26330    int tls1_process_sigalgs(SSL_CONNECTION *s);
26331    int tls1_set_peer_legacy_sigalg(SSL_CONNECTION *s, const EVP_PKEY *pkey);
26332    int tls1_lookup_md(SSL_CTX *ctx, const SIGALG_LOOKUP *lu,
26333                             const EVP_MD **pmd);
26334    size_t tls12_get_psigalgs(SSL_CONNECTION *s, int sent,
26335                                    const uint16_t **psigs);
26336    int tls_check_sigalg_curve(const SSL_CONNECTION *s, int curve);
26337    int tls12_check_peer_sigalg(SSL_CONNECTION *s, uint16_t, EVP_PKEY *pkey);
26338    int ssl_set_client_disabled(SSL_CONNECTION *s);
26339    int ssl_cipher_disabled(const SSL_CONNECTION *s, const SSL_CIPHER *c,
26340                                  int op, int echde);
26341   
26342    int ssl_handshake_hash(SSL_CONNECTION *s,
26343                                 unsigned char *out, size_t outlen,
26344                                 size_t *hashlen);
26345    const EVP_MD *ssl_md(SSL_CTX *ctx, int idx);
26346   int ssl_get_md_idx(int md_nid);
26347    const EVP_MD *ssl_handshake_md(SSL_CONNECTION *s);
26348    const EVP_MD *ssl_prf_md(SSL_CONNECTION *s);
26349   
26350   
26351   
26352   
26353   
26354   
26355   
26356    int ssl_log_rsa_client_key_exchange(SSL_CONNECTION *s,
26357                                              const uint8_t *encrypted_premaster,
26358                                              size_t encrypted_premaster_len,
26359                                              const uint8_t *premaster,
26360                                              size_t premaster_len);
26361   
26362   
26363   
26364   
26365   
26366   
26367    int ssl_log_secret(SSL_CONNECTION *s, const char *label,
26368                             const uint8_t *secret, size_t secret_len);
26369   # 2882 "ssl/ssl_local.h"
26370    int srp_generate_server_master_secret(SSL_CONNECTION *s);
26371    int srp_generate_client_master_secret(SSL_CONNECTION *s);
26372    int srp_verify_server_param(SSL_CONNECTION *s);
26373   
26374   
26375   
26376    int send_certificate_request(SSL_CONNECTION *s);
26377   
26378   
26379   
26380   custom_ext_method *custom_ext_find(const custom_ext_methods *exts,
26381                                      ENDPOINT role, unsigned int ext_type,
26382                                      size_t *idx);
26383   
26384   void custom_ext_init(custom_ext_methods *meths);
26385   
26386   int ossl_tls_add_custom_ext_intern(SSL_CTX *ctx, custom_ext_methods *exts,
26387                                      ENDPOINT role, unsigned int ext_type,
26388                                      unsigned int context,
26389                                      SSL_custom_ext_add_cb_ex add_cb,
26390                                      SSL_custom_ext_free_cb_ex free_cb,
26391                                      void *add_arg,
26392                                      SSL_custom_ext_parse_cb_ex parse_cb,
26393                                      void *parse_arg);
26394    int custom_ext_parse(SSL_CONNECTION *s, unsigned int context,
26395                               unsigned int ext_type,
26396                               const unsigned char *ext_data, size_t ext_size,
26397                               X509 *x, size_t chainidx);
26398    int custom_ext_add(SSL_CONNECTION *s, int context, WPACKET *pkt, X509 *x,
26399                             size_t chainidx, int maxversion);
26400   
26401    int custom_exts_copy(custom_ext_methods *dst,
26402                               const custom_ext_methods *src);
26403    int custom_exts_copy_flags(custom_ext_methods *dst,
26404                                     const custom_ext_methods *src);
26405   void custom_exts_free(custom_ext_methods *exts);
26406   
26407   void ssl_comp_free_compression_methods_int(void);
26408   
26409   
26410   void ssl_ctx_system_config(SSL_CTX *ctx);
26411   
26412   const EVP_CIPHER *ssl_evp_cipher_fetch(OSSL_LIB_CTX *libctx,
26413                                          int nid,
26414                                          const char *properties);
26415   int ssl_evp_cipher_up_ref(const EVP_CIPHER *cipher);
26416   void ssl_evp_cipher_free(const EVP_CIPHER *cipher);
26417   const EVP_MD *ssl_evp_md_fetch(OSSL_LIB_CTX *libctx,
26418                                  int nid,
26419                                  const char *properties);
26420   int ssl_evp_md_up_ref(const EVP_MD *md);
26421   void ssl_evp_md_free(const EVP_MD *md);
26422   
26423   void tls_engine_finish(ENGINE *e);
26424   const EVP_CIPHER *tls_get_cipher_from_engine(int nid);
26425   const EVP_MD *tls_get_digest_from_engine(int nid);
26426   int tls_engine_load_ssl_client_cert(SSL_CONNECTION *s, X509 **px509,
26427                                       EVP_PKEY **ppkey);
26428   int ssl_hmac_old_new(SSL_HMAC *ret);
26429   void ssl_hmac_old_free(SSL_HMAC *ctx);
26430   int ssl_hmac_old_init(SSL_HMAC *ctx, void *key, size_t len, char *md);
26431   int ssl_hmac_old_update(SSL_HMAC *ctx, const unsigned char *data, size_t len);
26432   int ssl_hmac_old_final(SSL_HMAC *ctx, unsigned char *md, size_t *len);
26433   size_t ssl_hmac_old_size(const SSL_HMAC *ctx);
26434   
26435   int ssl_ctx_srp_ctx_free_intern(SSL_CTX *ctx);
26436   int ssl_ctx_srp_ctx_init_intern(SSL_CTX *ctx);
26437   int ssl_srp_ctx_free_intern(SSL_CONNECTION *s);
26438   int ssl_srp_ctx_init_intern(SSL_CONNECTION *s);
26439   
26440   int ssl_srp_calc_a_param_intern(SSL_CONNECTION *s);
26441   int ssl_srp_server_param_with_username_intern(SSL_CONNECTION *s, int *ad);
26442   
26443   void ssl_session_calculate_timeout(SSL_SESSION *ss);
26444   # 2964 "ssl/ssl_local.h"
26445   static __attribute__((unused)) inline int ssl_tsan_lock(const SSL_CTX *ctx)
26446   {
26447   
26448   
26449   
26450   
26451       return 1;
26452   }
26453   
26454   static __attribute__((unused)) inline void ssl_tsan_unlock(const SSL_CTX *ctx)
26455   {
26456   
26457   
26458   
26459   }
26460   
26461   static __attribute__((unused)) inline void ssl_tsan_counter(const SSL_CTX *ctx,
26462                                                        _Atomic int *stat)
26463   {
26464       if (ssl_tsan_lock(ctx)) {
26465           
26466   # 2984 "ssl/ssl_local.h" 3 4
26467          __atomic_fetch_add ((
26468   # 2984 "ssl/ssl_local.h"
26469          ((stat))
26470   # 2984 "ssl/ssl_local.h" 3 4
26471          ), (
26472   # 2984 "ssl/ssl_local.h"
26473          (1)
26474   # 2984 "ssl/ssl_local.h" 3 4
26475          ), (
26476   # 2984 "ssl/ssl_local.h"
26477          memory_order_relaxed
26478   # 2984 "ssl/ssl_local.h" 3 4
26479          ))
26480   # 2984 "ssl/ssl_local.h"
26481                            ;
26482           ssl_tsan_unlock(ctx);
26483       }
26484   }
26485   
26486   int ossl_comp_has_alg(int a);
26487   size_t ossl_calculate_comp_expansion(int alg, size_t length);
26488   
26489   void ossl_ssl_set_custom_record_layer(SSL_CONNECTION *s,
26490                                         const OSSL_RECORD_METHOD *meth,
26491                                         void *rlarg);
26492   
26493   long ossl_ctrl_internal(SSL *s, int cmd, long larg, void *parg, int no_quic);
26494   # 14 "ssl/ssl_lib.c" 2
26495   
26496   
26497   # 1 "include/openssl/x509v3.h" 1
26498   # 17 "include/openssl/x509v3.h"
26499           
26500   # 27 "include/openssl/x509v3.h"
26501   # 1 "include/openssl/x509v3err.h" 1
26502   # 13 "include/openssl/x509v3err.h"
26503           
26504   # 28 "include/openssl/x509v3.h" 2
26505   # 37 "include/openssl/x509v3.h"
26506   struct v3_ext_method;
26507   struct v3_ext_ctx;
26508   
26509   
26510   
26511   typedef void *(*X509V3_EXT_NEW)(void);
26512   typedef void (*X509V3_EXT_FREE) (void *);
26513   typedef void *(*X509V3_EXT_D2I)(void *, const unsigned char **, long);
26514   typedef int (*X509V3_EXT_I2D) (const void *, unsigned char **);
26515   typedef struct stack_st_CONF_VALUE *
26516       (*X509V3_EXT_I2V) (const struct v3_ext_method *method, void *ext,
26517                          struct stack_st_CONF_VALUE *extlist);
26518   typedef void *(*X509V3_EXT_V2I)(const struct v3_ext_method *method,
26519                                   struct v3_ext_ctx *ctx,
26520                                   struct stack_st_CONF_VALUE *values);
26521   typedef char *(*X509V3_EXT_I2S)(const struct v3_ext_method *method,
26522                                   void *ext);
26523   typedef void *(*X509V3_EXT_S2I)(const struct v3_ext_method *method,
26524                                   struct v3_ext_ctx *ctx, const char *str);
26525   typedef int (*X509V3_EXT_I2R) (const struct v3_ext_method *method, void *ext,
26526                                  BIO *out, int indent);
26527   typedef void *(*X509V3_EXT_R2I)(const struct v3_ext_method *method,
26528                                   struct v3_ext_ctx *ctx, const char *str);
26529   
26530   
26531   
26532   struct v3_ext_method {
26533       int ext_nid;
26534       int ext_flags;
26535   
26536       ASN1_ITEM_EXP *it;
26537   
26538       X509V3_EXT_NEW ext_new;
26539       X509V3_EXT_FREE ext_free;
26540       X509V3_EXT_D2I d2i;
26541       X509V3_EXT_I2D i2d;
26542   
26543       X509V3_EXT_I2S i2s;
26544       X509V3_EXT_S2I s2i;
26545   
26546       X509V3_EXT_I2V i2v;
26547       X509V3_EXT_V2I v2i;
26548   
26549       X509V3_EXT_I2R i2r;
26550       X509V3_EXT_R2I r2i;
26551       void *usr_data;
26552   };
26553   
26554   typedef struct X509V3_CONF_METHOD_st {
26555       char *(*get_string) (void *db, const char *section, const char *value);
26556       struct stack_st_CONF_VALUE *(*get_section) (void *db, const char *section);
26557       void (*free_string) (void *db, char *string);
26558       void (*free_section) (void *db, struct stack_st_CONF_VALUE *section);
26559   } X509V3_CONF_METHOD;
26560   
26561   
26562   struct v3_ext_ctx {
26563   
26564   
26565   
26566   
26567   
26568       int flags;
26569       X509 *issuer_cert;
26570       X509 *subject_cert;
26571       X509_REQ *subject_req;
26572       X509_CRL *crl;
26573       X509V3_CONF_METHOD *db_meth;
26574       void *db;
26575       EVP_PKEY *issuer_pkey;
26576   
26577   };
26578   
26579   typedef struct v3_ext_method X509V3_EXT_METHOD;
26580   
26581   struct stack_st_X509V3_EXT_METHOD; typedef int (*sk_X509V3_EXT_METHOD_compfunc)(const X509V3_EXT_METHOD * const *a, const X509V3_EXT_METHOD *const *b); typedef void (*sk_X509V3_EXT_METHOD_freefunc)(X509V3_EXT_METHOD *a); typedef X509V3_EXT_METHOD * (*sk_X509V3_EXT_METHOD_copyfunc)(const X509V3_EXT_METHOD *a); static __attribute__((unused)) inline X509V3_EXT_METHOD *ossl_check_X509V3_EXT_METHOD_type(X509V3_EXT_METHOD *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509V3_EXT_METHOD_sk_type(const struct stack_st_X509V3_EXT_METHOD *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509V3_EXT_METHOD_sk_type(struct stack_st_X509V3_EXT_METHOD *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509V3_EXT_METHOD_compfunc_type(sk_X509V3_EXT_METHOD_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509V3_EXT_METHOD_copyfunc_type(sk_X509V3_EXT_METHOD_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509V3_EXT_METHOD_freefunc_type(sk_X509V3_EXT_METHOD_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
26582   # 145 "include/openssl/x509v3.h"
26583   typedef BIT_STRING_BITNAME ENUMERATED_NAMES;
26584   
26585   typedef struct BASIC_CONSTRAINTS_st {
26586       int ca;
26587       ASN1_INTEGER *pathlen;
26588   } BASIC_CONSTRAINTS;
26589   
26590   typedef struct PKEY_USAGE_PERIOD_st {
26591       ASN1_GENERALIZEDTIME *notBefore;
26592       ASN1_GENERALIZEDTIME *notAfter;
26593   } PKEY_USAGE_PERIOD;
26594   
26595   typedef struct otherName_st {
26596       ASN1_OBJECT *type_id;
26597       ASN1_TYPE *value;
26598   } OTHERNAME;
26599   
26600   typedef struct EDIPartyName_st {
26601       ASN1_STRING *nameAssigner;
26602       ASN1_STRING *partyName;
26603   } EDIPARTYNAME;
26604   
26605   typedef struct GENERAL_NAME_st {
26606   # 177 "include/openssl/x509v3.h"
26607       int type;
26608       union {
26609           char *ptr;
26610           OTHERNAME *otherName;
26611           ASN1_IA5STRING *rfc822Name;
26612           ASN1_IA5STRING *dNSName;
26613           ASN1_STRING *x400Address;
26614           X509_NAME *directoryName;
26615           EDIPARTYNAME *ediPartyName;
26616           ASN1_IA5STRING *uniformResourceIdentifier;
26617           ASN1_OCTET_STRING *iPAddress;
26618           ASN1_OBJECT *registeredID;
26619   
26620           ASN1_OCTET_STRING *ip;
26621           X509_NAME *dirn;
26622           ASN1_IA5STRING *ia5;
26623   
26624           ASN1_OBJECT *rid;
26625           ASN1_TYPE *other;
26626       } d;
26627   } GENERAL_NAME;
26628   
26629   typedef struct ACCESS_DESCRIPTION_st {
26630       ASN1_OBJECT *method;
26631       GENERAL_NAME *location;
26632   } ACCESS_DESCRIPTION;
26633   
26634   struct stack_st_ACCESS_DESCRIPTION; typedef int (*sk_ACCESS_DESCRIPTION_compfunc)(const ACCESS_DESCRIPTION * const *a, const ACCESS_DESCRIPTION *const *b); typedef void (*sk_ACCESS_DESCRIPTION_freefunc)(ACCESS_DESCRIPTION *a); typedef ACCESS_DESCRIPTION * (*sk_ACCESS_DESCRIPTION_copyfunc)(const ACCESS_DESCRIPTION *a); static __attribute__((unused)) inline ACCESS_DESCRIPTION *ossl_check_ACCESS_DESCRIPTION_type(ACCESS_DESCRIPTION *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_ACCESS_DESCRIPTION_sk_type(const struct stack_st_ACCESS_DESCRIPTION *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_ACCESS_DESCRIPTION_sk_type(struct stack_st_ACCESS_DESCRIPTION *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_ACCESS_DESCRIPTION_compfunc_type(sk_ACCESS_DESCRIPTION_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_ACCESS_DESCRIPTION_copyfunc_type(sk_ACCESS_DESCRIPTION_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_ACCESS_DESCRIPTION_freefunc_type(sk_ACCESS_DESCRIPTION_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
26635   # 230 "include/openssl/x509v3.h"
26636   struct stack_st_GENERAL_NAME; typedef int (*sk_GENERAL_NAME_compfunc)(const GENERAL_NAME * const *a, const GENERAL_NAME *const *b); typedef void (*sk_GENERAL_NAME_freefunc)(GENERAL_NAME *a); typedef GENERAL_NAME * (*sk_GENERAL_NAME_copyfunc)(const GENERAL_NAME *a); static __attribute__((unused)) inline GENERAL_NAME *ossl_check_GENERAL_NAME_type(GENERAL_NAME *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_GENERAL_NAME_sk_type(const struct stack_st_GENERAL_NAME *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_GENERAL_NAME_sk_type(struct stack_st_GENERAL_NAME *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_GENERAL_NAME_compfunc_type(sk_GENERAL_NAME_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_GENERAL_NAME_copyfunc_type(sk_GENERAL_NAME_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_GENERAL_NAME_freefunc_type(sk_GENERAL_NAME_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
26637   # 258 "include/openssl/x509v3.h"
26638   typedef struct stack_st_ACCESS_DESCRIPTION AUTHORITY_INFO_ACCESS;
26639   typedef struct stack_st_ASN1_OBJECT EXTENDED_KEY_USAGE;
26640   typedef struct stack_st_ASN1_INTEGER TLS_FEATURE;
26641   typedef struct stack_st_GENERAL_NAME GENERAL_NAMES;
26642   
26643   struct stack_st_GENERAL_NAMES; typedef int (*sk_GENERAL_NAMES_compfunc)(const GENERAL_NAMES * const *a, const GENERAL_NAMES *const *b); typedef void (*sk_GENERAL_NAMES_freefunc)(GENERAL_NAMES *a); typedef GENERAL_NAMES * (*sk_GENERAL_NAMES_copyfunc)(const GENERAL_NAMES *a); static __attribute__((unused)) inline GENERAL_NAMES *ossl_check_GENERAL_NAMES_type(GENERAL_NAMES *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_GENERAL_NAMES_sk_type(const struct stack_st_GENERAL_NAMES *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_GENERAL_NAMES_sk_type(struct stack_st_GENERAL_NAMES *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_GENERAL_NAMES_compfunc_type(sk_GENERAL_NAMES_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_GENERAL_NAMES_copyfunc_type(sk_GENERAL_NAMES_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_GENERAL_NAMES_freefunc_type(sk_GENERAL_NAMES_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
26644   # 291 "include/openssl/x509v3.h"
26645   typedef struct DIST_POINT_NAME_st {
26646       int type;
26647       union {
26648           GENERAL_NAMES *fullname;
26649           struct stack_st_X509_NAME_ENTRY *relativename;
26650       } name;
26651   
26652       X509_NAME *dpname;
26653   } DIST_POINT_NAME;
26654   # 315 "include/openssl/x509v3.h"
26655   struct DIST_POINT_st {
26656       DIST_POINT_NAME *distpoint;
26657       ASN1_BIT_STRING *reasons;
26658       GENERAL_NAMES *CRLissuer;
26659       int dp_reasons;
26660   };
26661   
26662   struct stack_st_DIST_POINT; typedef int (*sk_DIST_POINT_compfunc)(const DIST_POINT * const *a, const DIST_POINT *const *b); typedef void (*sk_DIST_POINT_freefunc)(DIST_POINT *a); typedef DIST_POINT * (*sk_DIST_POINT_copyfunc)(const DIST_POINT *a); static __attribute__((unused)) inline DIST_POINT *ossl_check_DIST_POINT_type(DIST_POINT *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_DIST_POINT_sk_type(const struct stack_st_DIST_POINT *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_DIST_POINT_sk_type(struct stack_st_DIST_POINT *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_DIST_POINT_compfunc_type(sk_DIST_POINT_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_DIST_POINT_copyfunc_type(sk_DIST_POINT_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_DIST_POINT_freefunc_type(sk_DIST_POINT_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
26663   # 350 "include/openssl/x509v3.h"
26664   typedef struct stack_st_DIST_POINT CRL_DIST_POINTS;
26665   
26666   struct AUTHORITY_KEYID_st {
26667       ASN1_OCTET_STRING *keyid;
26668       GENERAL_NAMES *issuer;
26669       ASN1_INTEGER *serial;
26670   };
26671   
26672   
26673   
26674   typedef struct SXNET_ID_st {
26675       ASN1_INTEGER *zone;
26676       ASN1_OCTET_STRING *user;
26677   } SXNETID;
26678   
26679   struct stack_st_SXNETID; typedef int (*sk_SXNETID_compfunc)(const SXNETID * const *a, const SXNETID *const *b); typedef void (*sk_SXNETID_freefunc)(SXNETID *a); typedef SXNETID * (*sk_SXNETID_copyfunc)(const SXNETID *a); static __attribute__((unused)) inline SXNETID *ossl_check_SXNETID_type(SXNETID *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_SXNETID_sk_type(const struct stack_st_SXNETID *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_SXNETID_sk_type(struct stack_st_SXNETID *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_SXNETID_compfunc_type(sk_SXNETID_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_SXNETID_copyfunc_type(sk_SXNETID_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_SXNETID_freefunc_type(sk_SXNETID_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
26680   # 394 "include/openssl/x509v3.h"
26681   typedef struct SXNET_st {
26682       ASN1_INTEGER *version;
26683       struct stack_st_SXNETID *ids;
26684   } SXNET;
26685   
26686   typedef struct ISSUER_SIGN_TOOL_st {
26687       ASN1_UTF8STRING *signTool;
26688       ASN1_UTF8STRING *cATool;
26689       ASN1_UTF8STRING *signToolCert;
26690       ASN1_UTF8STRING *cAToolCert;
26691   } ISSUER_SIGN_TOOL;
26692   
26693   typedef struct NOTICEREF_st {
26694       ASN1_STRING *organization;
26695       struct stack_st_ASN1_INTEGER *noticenos;
26696   } NOTICEREF;
26697   
26698   typedef struct USERNOTICE_st {
26699       NOTICEREF *noticeref;
26700       ASN1_STRING *exptext;
26701   } USERNOTICE;
26702   
26703   typedef struct POLICYQUALINFO_st {
26704       ASN1_OBJECT *pqualid;
26705       union {
26706           ASN1_IA5STRING *cpsuri;
26707           USERNOTICE *usernotice;
26708           ASN1_TYPE *other;
26709       } d;
26710   } POLICYQUALINFO;
26711   
26712   struct stack_st_POLICYQUALINFO; typedef int (*sk_POLICYQUALINFO_compfunc)(const POLICYQUALINFO * const *a, const POLICYQUALINFO *const *b); typedef void (*sk_POLICYQUALINFO_freefunc)(POLICYQUALINFO *a); typedef POLICYQUALINFO * (*sk_POLICYQUALINFO_copyfunc)(const POLICYQUALINFO *a); static __attribute__((unused)) inline POLICYQUALINFO *ossl_check_POLICYQUALINFO_type(POLICYQUALINFO *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_POLICYQUALINFO_sk_type(const struct stack_st_POLICYQUALINFO *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_POLICYQUALINFO_sk_type(struct stack_st_POLICYQUALINFO *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_POLICYQUALINFO_compfunc_type(sk_POLICYQUALINFO_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_POLICYQUALINFO_copyfunc_type(sk_POLICYQUALINFO_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_POLICYQUALINFO_freefunc_type(sk_POLICYQUALINFO_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
26713   # 454 "include/openssl/x509v3.h"
26714   typedef struct POLICYINFO_st {
26715       ASN1_OBJECT *policyid;
26716       struct stack_st_POLICYQUALINFO *qualifiers;
26717   } POLICYINFO;
26718   
26719   struct stack_st_POLICYINFO; typedef int (*sk_POLICYINFO_compfunc)(const POLICYINFO * const *a, const POLICYINFO *const *b); typedef void (*sk_POLICYINFO_freefunc)(POLICYINFO *a); typedef POLICYINFO * (*sk_POLICYINFO_copyfunc)(const POLICYINFO *a); static __attribute__((unused)) inline POLICYINFO *ossl_check_POLICYINFO_type(POLICYINFO *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_POLICYINFO_sk_type(const struct stack_st_POLICYINFO *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_POLICYINFO_sk_type(struct stack_st_POLICYINFO *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_POLICYINFO_compfunc_type(sk_POLICYINFO_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_POLICYINFO_copyfunc_type(sk_POLICYINFO_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_POLICYINFO_freefunc_type(sk_POLICYINFO_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
26720   # 487 "include/openssl/x509v3.h"
26721   typedef struct stack_st_POLICYINFO CERTIFICATEPOLICIES;
26722   
26723   typedef struct POLICY_MAPPING_st {
26724       ASN1_OBJECT *issuerDomainPolicy;
26725       ASN1_OBJECT *subjectDomainPolicy;
26726   } POLICY_MAPPING;
26727   
26728   struct stack_st_POLICY_MAPPING; typedef int (*sk_POLICY_MAPPING_compfunc)(const POLICY_MAPPING * const *a, const POLICY_MAPPING *const *b); typedef void (*sk_POLICY_MAPPING_freefunc)(POLICY_MAPPING *a); typedef POLICY_MAPPING * (*sk_POLICY_MAPPING_copyfunc)(const POLICY_MAPPING *a); static __attribute__((unused)) inline POLICY_MAPPING *ossl_check_POLICY_MAPPING_type(POLICY_MAPPING *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_POLICY_MAPPING_sk_type(const struct stack_st_POLICY_MAPPING *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_POLICY_MAPPING_sk_type(struct stack_st_POLICY_MAPPING *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_POLICY_MAPPING_compfunc_type(sk_POLICY_MAPPING_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_POLICY_MAPPING_copyfunc_type(sk_POLICY_MAPPING_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_POLICY_MAPPING_freefunc_type(sk_POLICY_MAPPING_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
26729   # 522 "include/openssl/x509v3.h"
26730   typedef struct stack_st_POLICY_MAPPING POLICY_MAPPINGS;
26731   
26732   typedef struct GENERAL_SUBTREE_st {
26733       GENERAL_NAME *base;
26734       ASN1_INTEGER *minimum;
26735       ASN1_INTEGER *maximum;
26736   } GENERAL_SUBTREE;
26737   
26738   struct stack_st_GENERAL_SUBTREE; typedef int (*sk_GENERAL_SUBTREE_compfunc)(const GENERAL_SUBTREE * const *a, const GENERAL_SUBTREE *const *b); typedef void (*sk_GENERAL_SUBTREE_freefunc)(GENERAL_SUBTREE *a); typedef GENERAL_SUBTREE * (*sk_GENERAL_SUBTREE_copyfunc)(const GENERAL_SUBTREE *a); static __attribute__((unused)) inline GENERAL_SUBTREE *ossl_check_GENERAL_SUBTREE_type(GENERAL_SUBTREE *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_GENERAL_SUBTREE_sk_type(const struct stack_st_GENERAL_SUBTREE *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_GENERAL_SUBTREE_sk_type(struct stack_st_GENERAL_SUBTREE *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_GENERAL_SUBTREE_compfunc_type(sk_GENERAL_SUBTREE_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_GENERAL_SUBTREE_copyfunc_type(sk_GENERAL_SUBTREE_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_GENERAL_SUBTREE_freefunc_type(sk_GENERAL_SUBTREE_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
26739   # 558 "include/openssl/x509v3.h"
26740   struct NAME_CONSTRAINTS_st {
26741       struct stack_st_GENERAL_SUBTREE *permittedSubtrees;
26742       struct stack_st_GENERAL_SUBTREE *excludedSubtrees;
26743   };
26744   
26745   typedef struct POLICY_CONSTRAINTS_st {
26746       ASN1_INTEGER *requireExplicitPolicy;
26747       ASN1_INTEGER *inhibitPolicyMapping;
26748   } POLICY_CONSTRAINTS;
26749   
26750   
26751   typedef struct PROXY_POLICY_st {
26752       ASN1_OBJECT *policyLanguage;
26753       ASN1_OCTET_STRING *policy;
26754   } PROXY_POLICY;
26755   
26756   typedef struct PROXY_CERT_INFO_EXTENSION_st {
26757       ASN1_INTEGER *pcPathLengthConstraint;
26758       PROXY_POLICY *proxyPolicy;
26759   } PROXY_CERT_INFO_EXTENSION;
26760   
26761   extern PROXY_POLICY *PROXY_POLICY_new(void); extern void PROXY_POLICY_free(PROXY_POLICY *a); extern PROXY_POLICY *d2i_PROXY_POLICY(PROXY_POLICY **a, const unsigned char **in, long len); extern int i2d_PROXY_POLICY(const PROXY_POLICY *a, unsigned char **out); extern const ASN1_ITEM * PROXY_POLICY_it(void);
26762   extern PROXY_CERT_INFO_EXTENSION *PROXY_CERT_INFO_EXTENSION_new(void); extern void PROXY_CERT_INFO_EXTENSION_free(PROXY_CERT_INFO_EXTENSION *a); extern PROXY_CERT_INFO_EXTENSION *d2i_PROXY_CERT_INFO_EXTENSION(PROXY_CERT_INFO_EXTENSION **a, const unsigned char **in, long len); extern int i2d_PROXY_CERT_INFO_EXTENSION(const PROXY_CERT_INFO_EXTENSION *a, unsigned char **out); extern const ASN1_ITEM * PROXY_CERT_INFO_EXTENSION_it(void);
26763   
26764   struct ISSUING_DIST_POINT_st {
26765       DIST_POINT_NAME *distpoint;
26766       int onlyuser;
26767       int onlyCA;
26768       ASN1_BIT_STRING *onlysomereasons;
26769       int indirectCRL;
26770       int onlyattr;
26771   };
26772   # 697 "include/openssl/x509v3.h"
26773   typedef struct x509_purpose_st {
26774       int purpose;
26775       int trust;
26776       int flags;
26777       int (*check_purpose) (const struct x509_purpose_st *, const X509 *, int);
26778       char *name;
26779       char *sname;
26780       void *usr_data;
26781   } X509_PURPOSE;
26782   
26783   struct stack_st_X509_PURPOSE; typedef int (*sk_X509_PURPOSE_compfunc)(const X509_PURPOSE * const *a, const X509_PURPOSE *const *b); typedef void (*sk_X509_PURPOSE_freefunc)(X509_PURPOSE *a); typedef X509_PURPOSE * (*sk_X509_PURPOSE_copyfunc)(const X509_PURPOSE *a); static __attribute__((unused)) inline X509_PURPOSE *ossl_check_X509_PURPOSE_type(X509_PURPOSE *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_PURPOSE_sk_type(const struct stack_st_X509_PURPOSE *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_PURPOSE_sk_type(struct stack_st_X509_PURPOSE *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_PURPOSE_compfunc_type(sk_X509_PURPOSE_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_PURPOSE_copyfunc_type(sk_X509_PURPOSE_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_PURPOSE_freefunc_type(sk_X509_PURPOSE_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
26784   # 773 "include/openssl/x509v3.h"
26785   extern BASIC_CONSTRAINTS *BASIC_CONSTRAINTS_new(void); extern void BASIC_CONSTRAINTS_free(BASIC_CONSTRAINTS *a); extern BASIC_CONSTRAINTS *d2i_BASIC_CONSTRAINTS(BASIC_CONSTRAINTS **a, const unsigned char **in, long len); extern int i2d_BASIC_CONSTRAINTS(const BASIC_CONSTRAINTS *a, unsigned char **out); extern const ASN1_ITEM * BASIC_CONSTRAINTS_it(void);
26786   
26787   extern SXNET *SXNET_new(void); extern void SXNET_free(SXNET *a); extern SXNET *d2i_SXNET(SXNET **a, const unsigned char **in, long len); extern int i2d_SXNET(const SXNET *a, unsigned char **out); extern const ASN1_ITEM * SXNET_it(void);
26788   extern SXNETID *SXNETID_new(void); extern void SXNETID_free(SXNETID *a); extern SXNETID *d2i_SXNETID(SXNETID **a, const unsigned char **in, long len); extern int i2d_SXNETID(const SXNETID *a, unsigned char **out); extern const ASN1_ITEM * SXNETID_it(void);
26789   
26790   extern ISSUER_SIGN_TOOL *ISSUER_SIGN_TOOL_new(void); extern void ISSUER_SIGN_TOOL_free(ISSUER_SIGN_TOOL *a); extern ISSUER_SIGN_TOOL *d2i_ISSUER_SIGN_TOOL(ISSUER_SIGN_TOOL **a, const unsigned char **in, long len); extern int i2d_ISSUER_SIGN_TOOL(const ISSUER_SIGN_TOOL *a, unsigned char **out); extern const ASN1_ITEM * ISSUER_SIGN_TOOL_it(void);
26791   
26792   int SXNET_add_id_asc(SXNET **psx, const char *zone, const char *user, int userlen);
26793   int SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, const char *user,
26794                          int userlen);
26795   int SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *izone, const char *user,
26796                            int userlen);
26797   
26798   ASN1_OCTET_STRING *SXNET_get_id_asc(SXNET *sx, const char *zone);
26799   ASN1_OCTET_STRING *SXNET_get_id_ulong(SXNET *sx, unsigned long lzone);
26800   ASN1_OCTET_STRING *SXNET_get_id_INTEGER(SXNET *sx, ASN1_INTEGER *zone);
26801   
26802   extern AUTHORITY_KEYID *AUTHORITY_KEYID_new(void); extern void AUTHORITY_KEYID_free(AUTHORITY_KEYID *a); extern AUTHORITY_KEYID *d2i_AUTHORITY_KEYID(AUTHORITY_KEYID **a, const unsigned char **in, long len); extern int i2d_AUTHORITY_KEYID(const AUTHORITY_KEYID *a, unsigned char **out); extern const ASN1_ITEM * AUTHORITY_KEYID_it(void);
26803   
26804   extern PKEY_USAGE_PERIOD *PKEY_USAGE_PERIOD_new(void); extern void PKEY_USAGE_PERIOD_free(PKEY_USAGE_PERIOD *a); extern PKEY_USAGE_PERIOD *d2i_PKEY_USAGE_PERIOD(PKEY_USAGE_PERIOD **a, const unsigned char **in, long len); extern int i2d_PKEY_USAGE_PERIOD(const PKEY_USAGE_PERIOD *a, unsigned char **out); extern const ASN1_ITEM * PKEY_USAGE_PERIOD_it(void);
26805   
26806   extern GENERAL_NAME *GENERAL_NAME_new(void); extern void GENERAL_NAME_free(GENERAL_NAME *a); extern GENERAL_NAME *d2i_GENERAL_NAME(GENERAL_NAME **a, const unsigned char **in, long len); extern int i2d_GENERAL_NAME(const GENERAL_NAME *a, unsigned char **out); extern const ASN1_ITEM * GENERAL_NAME_it(void);
26807   extern GENERAL_NAME *GENERAL_NAME_dup(const GENERAL_NAME *a);
26808   int GENERAL_NAME_cmp(GENERAL_NAME *a, GENERAL_NAME *b);
26809   
26810   ASN1_BIT_STRING *v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method,
26811                                        X509V3_CTX *ctx,
26812                                        struct stack_st_CONF_VALUE *nval);
26813   struct stack_st_CONF_VALUE *i2v_ASN1_BIT_STRING(X509V3_EXT_METHOD *method,
26814                                             ASN1_BIT_STRING *bits,
26815                                             struct stack_st_CONF_VALUE *extlist);
26816   char *i2s_ASN1_IA5STRING(X509V3_EXT_METHOD *method, ASN1_IA5STRING *ia5);
26817   ASN1_IA5STRING *s2i_ASN1_IA5STRING(X509V3_EXT_METHOD *method,
26818                                      X509V3_CTX *ctx, const char *str);
26819   char *i2s_ASN1_UTF8STRING(X509V3_EXT_METHOD *method, ASN1_UTF8STRING *utf8);
26820   ASN1_UTF8STRING *s2i_ASN1_UTF8STRING(X509V3_EXT_METHOD *method,
26821                                      X509V3_CTX *ctx, const char *str);
26822   
26823   struct stack_st_CONF_VALUE *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method,
26824                                          GENERAL_NAME *gen,
26825                                          struct stack_st_CONF_VALUE *ret);
26826   int GENERAL_NAME_print(BIO *out, GENERAL_NAME *gen);
26827   
26828   extern GENERAL_NAMES *GENERAL_NAMES_new(void); extern void GENERAL_NAMES_free(GENERAL_NAMES *a); extern GENERAL_NAMES *d2i_GENERAL_NAMES(GENERAL_NAMES **a, const unsigned char **in, long len); extern int i2d_GENERAL_NAMES(const GENERAL_NAMES *a, unsigned char **out); extern const ASN1_ITEM * GENERAL_NAMES_it(void);
26829   
26830   struct stack_st_CONF_VALUE *i2v_GENERAL_NAMES(X509V3_EXT_METHOD *method,
26831                                           GENERAL_NAMES *gen,
26832                                           struct stack_st_CONF_VALUE *extlist);
26833   GENERAL_NAMES *v2i_GENERAL_NAMES(const X509V3_EXT_METHOD *method,
26834                                    X509V3_CTX *ctx, struct stack_st_CONF_VALUE *nval);
26835   
26836   extern OTHERNAME *OTHERNAME_new(void); extern void OTHERNAME_free(OTHERNAME *a); extern OTHERNAME *d2i_OTHERNAME(OTHERNAME **a, const unsigned char **in, long len); extern int i2d_OTHERNAME(const OTHERNAME *a, unsigned char **out); extern const ASN1_ITEM * OTHERNAME_it(void);
26837   extern EDIPARTYNAME *EDIPARTYNAME_new(void); extern void EDIPARTYNAME_free(EDIPARTYNAME *a); extern EDIPARTYNAME *d2i_EDIPARTYNAME(EDIPARTYNAME **a, const unsigned char **in, long len); extern int i2d_EDIPARTYNAME(const EDIPARTYNAME *a, unsigned char **out); extern const ASN1_ITEM * EDIPARTYNAME_it(void);
26838   int OTHERNAME_cmp(OTHERNAME *a, OTHERNAME *b);
26839   void GENERAL_NAME_set0_value(GENERAL_NAME *a, int type, void *value);
26840   void *GENERAL_NAME_get0_value(const GENERAL_NAME *a, int *ptype);
26841   int GENERAL_NAME_set0_othername(GENERAL_NAME *gen,
26842                                   ASN1_OBJECT *oid, ASN1_TYPE *value);
26843   int GENERAL_NAME_get0_otherName(const GENERAL_NAME *gen,
26844                                   ASN1_OBJECT **poid, ASN1_TYPE **pvalue);
26845   
26846   char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method,
26847                               const ASN1_OCTET_STRING *ia5);
26848   ASN1_OCTET_STRING *s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method,
26849                                            X509V3_CTX *ctx, const char *str);
26850   
26851   extern EXTENDED_KEY_USAGE *EXTENDED_KEY_USAGE_new(void); extern void EXTENDED_KEY_USAGE_free(EXTENDED_KEY_USAGE *a); extern EXTENDED_KEY_USAGE *d2i_EXTENDED_KEY_USAGE(EXTENDED_KEY_USAGE **a, const unsigned char **in, long len); extern int i2d_EXTENDED_KEY_USAGE(const EXTENDED_KEY_USAGE *a, unsigned char **out); extern const ASN1_ITEM * EXTENDED_KEY_USAGE_it(void);
26852   int i2a_ACCESS_DESCRIPTION(BIO *bp, const ACCESS_DESCRIPTION *a);
26853   
26854   extern TLS_FEATURE *TLS_FEATURE_new(void); extern void TLS_FEATURE_free(TLS_FEATURE *a);
26855   
26856   extern CERTIFICATEPOLICIES *CERTIFICATEPOLICIES_new(void); extern void CERTIFICATEPOLICIES_free(CERTIFICATEPOLICIES *a); extern CERTIFICATEPOLICIES *d2i_CERTIFICATEPOLICIES(CERTIFICATEPOLICIES **a, const unsigned char **in, long len); extern int i2d_CERTIFICATEPOLICIES(const CERTIFICATEPOLICIES *a, unsigned char **out); extern const ASN1_ITEM * CERTIFICATEPOLICIES_it(void);
26857   extern POLICYINFO *POLICYINFO_new(void); extern void POLICYINFO_free(POLICYINFO *a); extern POLICYINFO *d2i_POLICYINFO(POLICYINFO **a, const unsigned char **in, long len); extern int i2d_POLICYINFO(const POLICYINFO *a, unsigned char **out); extern const ASN1_ITEM * POLICYINFO_it(void);
26858   extern POLICYQUALINFO *POLICYQUALINFO_new(void); extern void POLICYQUALINFO_free(POLICYQUALINFO *a); extern POLICYQUALINFO *d2i_POLICYQUALINFO(POLICYQUALINFO **a, const unsigned char **in, long len); extern int i2d_POLICYQUALINFO(const POLICYQUALINFO *a, unsigned char **out); extern const ASN1_ITEM * POLICYQUALINFO_it(void);
26859   extern USERNOTICE *USERNOTICE_new(void); extern void USERNOTICE_free(USERNOTICE *a); extern USERNOTICE *d2i_USERNOTICE(USERNOTICE **a, const unsigned char **in, long len); extern int i2d_USERNOTICE(const USERNOTICE *a, unsigned char **out); extern const ASN1_ITEM * USERNOTICE_it(void);
26860   extern NOTICEREF *NOTICEREF_new(void); extern void NOTICEREF_free(NOTICEREF *a); extern NOTICEREF *d2i_NOTICEREF(NOTICEREF **a, const unsigned char **in, long len); extern int i2d_NOTICEREF(const NOTICEREF *a, unsigned char **out); extern const ASN1_ITEM * NOTICEREF_it(void);
26861   
26862   extern CRL_DIST_POINTS *CRL_DIST_POINTS_new(void); extern void CRL_DIST_POINTS_free(CRL_DIST_POINTS *a); extern CRL_DIST_POINTS *d2i_CRL_DIST_POINTS(CRL_DIST_POINTS **a, const unsigned char **in, long len); extern int i2d_CRL_DIST_POINTS(const CRL_DIST_POINTS *a, unsigned char **out); extern const ASN1_ITEM * CRL_DIST_POINTS_it(void);
26863   extern DIST_POINT *DIST_POINT_new(void); extern void DIST_POINT_free(DIST_POINT *a); extern DIST_POINT *d2i_DIST_POINT(DIST_POINT **a, const unsigned char **in, long len); extern int i2d_DIST_POINT(const DIST_POINT *a, unsigned char **out); extern const ASN1_ITEM * DIST_POINT_it(void);
26864   extern DIST_POINT_NAME *DIST_POINT_NAME_new(void); extern void DIST_POINT_NAME_free(DIST_POINT_NAME *a); extern DIST_POINT_NAME *d2i_DIST_POINT_NAME(DIST_POINT_NAME **a, const unsigned char **in, long len); extern int i2d_DIST_POINT_NAME(const DIST_POINT_NAME *a, unsigned char **out); extern const ASN1_ITEM * DIST_POINT_NAME_it(void);
26865   extern ISSUING_DIST_POINT *ISSUING_DIST_POINT_new(void); extern void ISSUING_DIST_POINT_free(ISSUING_DIST_POINT *a); extern ISSUING_DIST_POINT *d2i_ISSUING_DIST_POINT(ISSUING_DIST_POINT **a, const unsigned char **in, long len); extern int i2d_ISSUING_DIST_POINT(const ISSUING_DIST_POINT *a, unsigned char **out); extern const ASN1_ITEM * ISSUING_DIST_POINT_it(void);
26866   
26867   int DIST_POINT_set_dpname(DIST_POINT_NAME *dpn, const X509_NAME *iname);
26868   
26869   int NAME_CONSTRAINTS_check(X509 *x, NAME_CONSTRAINTS *nc);
26870   int NAME_CONSTRAINTS_check_CN(X509 *x, NAME_CONSTRAINTS *nc);
26871   
26872   extern ACCESS_DESCRIPTION *ACCESS_DESCRIPTION_new(void); extern void ACCESS_DESCRIPTION_free(ACCESS_DESCRIPTION *a); extern ACCESS_DESCRIPTION *d2i_ACCESS_DESCRIPTION(ACCESS_DESCRIPTION **a, const unsigned char **in, long len); extern int i2d_ACCESS_DESCRIPTION(const ACCESS_DESCRIPTION *a, unsigned char **out); extern const ASN1_ITEM * ACCESS_DESCRIPTION_it(void);
26873   extern AUTHORITY_INFO_ACCESS *AUTHORITY_INFO_ACCESS_new(void); extern void AUTHORITY_INFO_ACCESS_free(AUTHORITY_INFO_ACCESS *a); extern AUTHORITY_INFO_ACCESS *d2i_AUTHORITY_INFO_ACCESS(AUTHORITY_INFO_ACCESS **a, const unsigned char **in, long len); extern int i2d_AUTHORITY_INFO_ACCESS(const AUTHORITY_INFO_ACCESS *a, unsigned char **out); extern const ASN1_ITEM * AUTHORITY_INFO_ACCESS_it(void);
26874   
26875   extern const ASN1_ITEM * POLICY_MAPPING_it(void);
26876   extern POLICY_MAPPING *POLICY_MAPPING_new(void); extern void POLICY_MAPPING_free(POLICY_MAPPING *a);
26877   extern const ASN1_ITEM * POLICY_MAPPINGS_it(void);
26878   
26879   extern const ASN1_ITEM * GENERAL_SUBTREE_it(void);
26880   extern GENERAL_SUBTREE *GENERAL_SUBTREE_new(void); extern void GENERAL_SUBTREE_free(GENERAL_SUBTREE *a);
26881   
26882   extern const ASN1_ITEM * NAME_CONSTRAINTS_it(void);
26883   extern NAME_CONSTRAINTS *NAME_CONSTRAINTS_new(void); extern void NAME_CONSTRAINTS_free(NAME_CONSTRAINTS *a);
26884   
26885   extern POLICY_CONSTRAINTS *POLICY_CONSTRAINTS_new(void); extern void POLICY_CONSTRAINTS_free(POLICY_CONSTRAINTS *a);
26886   extern const ASN1_ITEM * POLICY_CONSTRAINTS_it(void);
26887   
26888   GENERAL_NAME *a2i_GENERAL_NAME(GENERAL_NAME *out,
26889                                  const X509V3_EXT_METHOD *method,
26890                                  X509V3_CTX *ctx, int gen_type,
26891                                  const char *value, int is_nc);
26892   
26893   
26894   GENERAL_NAME *v2i_GENERAL_NAME(const X509V3_EXT_METHOD *method,
26895                                  X509V3_CTX *ctx, CONF_VALUE *cnf);
26896   GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out,
26897                                     const X509V3_EXT_METHOD *method,
26898                                     X509V3_CTX *ctx, CONF_VALUE *cnf,
26899                                     int is_nc);
26900   
26901   void X509V3_conf_free(CONF_VALUE *val);
26902   
26903   X509_EXTENSION *X509V3_EXT_nconf_nid(CONF *conf, X509V3_CTX *ctx, int ext_nid,
26904                                        const char *value);
26905   X509_EXTENSION *X509V3_EXT_nconf(CONF *conf, X509V3_CTX *ctx, const char *name,
26906                                    const char *value);
26907   int X509V3_EXT_add_nconf_sk(CONF *conf, X509V3_CTX *ctx, const char *section,
26908                               struct stack_st_X509_EXTENSION **sk);
26909   int X509V3_EXT_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section,
26910                            X509 *cert);
26911   int X509V3_EXT_REQ_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section,
26912                                X509_REQ *req);
26913   int X509V3_EXT_CRL_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section,
26914                                X509_CRL *crl);
26915   
26916   X509_EXTENSION *X509V3_EXT_conf_nid(struct lhash_st_CONF_VALUE *conf,
26917                                       X509V3_CTX *ctx, int ext_nid,
26918                                       const char *value);
26919   X509_EXTENSION *X509V3_EXT_conf(struct lhash_st_CONF_VALUE *conf, X509V3_CTX *ctx,
26920                                   const char *name, const char *value);
26921   int X509V3_EXT_add_conf(struct lhash_st_CONF_VALUE *conf, X509V3_CTX *ctx,
26922                           const char *section, X509 *cert);
26923   int X509V3_EXT_REQ_add_conf(struct lhash_st_CONF_VALUE *conf, X509V3_CTX *ctx,
26924                               const char *section, X509_REQ *req);
26925   int X509V3_EXT_CRL_add_conf(struct lhash_st_CONF_VALUE *conf, X509V3_CTX *ctx,
26926                               const char *section, X509_CRL *crl);
26927   
26928   int X509V3_add_value_bool_nf(const char *name, int asn1_bool,
26929                                struct stack_st_CONF_VALUE **extlist);
26930   int X509V3_get_value_bool(const CONF_VALUE *value, int *asn1_bool);
26931   int X509V3_get_value_int(const CONF_VALUE *value, ASN1_INTEGER **aint);
26932   void X509V3_set_nconf(X509V3_CTX *ctx, CONF *conf);
26933   void X509V3_set_conf_lhash(X509V3_CTX *ctx, struct lhash_st_CONF_VALUE *lhash);
26934   
26935   
26936   char *X509V3_get_string(X509V3_CTX *ctx, const char *name, const char *section);
26937   struct stack_st_CONF_VALUE *X509V3_get_section(X509V3_CTX *ctx, const char *section);
26938   void X509V3_string_free(X509V3_CTX *ctx, char *str);
26939   void X509V3_section_free(X509V3_CTX *ctx, struct stack_st_CONF_VALUE *section);
26940   void X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subject,
26941                       X509_REQ *req, X509_CRL *crl, int flags);
26942   
26943   int X509V3_set_issuer_pkey(X509V3_CTX *ctx, EVP_PKEY *pkey);
26944   
26945   int X509V3_add_value(const char *name, const char *value,
26946                        struct stack_st_CONF_VALUE **extlist);
26947   int X509V3_add_value_uchar(const char *name, const unsigned char *value,
26948                              struct stack_st_CONF_VALUE **extlist);
26949   int X509V3_add_value_bool(const char *name, int asn1_bool,
26950                             struct stack_st_CONF_VALUE **extlist);
26951   int X509V3_add_value_int(const char *name, const ASN1_INTEGER *aint,
26952                            struct stack_st_CONF_VALUE **extlist);
26953   char *i2s_ASN1_INTEGER(X509V3_EXT_METHOD *meth, const ASN1_INTEGER *aint);
26954   ASN1_INTEGER *s2i_ASN1_INTEGER(X509V3_EXT_METHOD *meth, const char *value);
26955   char *i2s_ASN1_ENUMERATED(X509V3_EXT_METHOD *meth, const ASN1_ENUMERATED *aint);
26956   char *i2s_ASN1_ENUMERATED_TABLE(X509V3_EXT_METHOD *meth,
26957                                   const ASN1_ENUMERATED *aint);
26958   int X509V3_EXT_add(X509V3_EXT_METHOD *ext);
26959   int X509V3_EXT_add_list(X509V3_EXT_METHOD *extlist);
26960   int X509V3_EXT_add_alias(int nid_to, int nid_from);
26961   void X509V3_EXT_cleanup(void);
26962   
26963   const X509V3_EXT_METHOD *X509V3_EXT_get(X509_EXTENSION *ext);
26964   const X509V3_EXT_METHOD *X509V3_EXT_get_nid(int nid);
26965   int X509V3_add_standard_extensions(void);
26966   struct stack_st_CONF_VALUE *X509V3_parse_list(const char *line);
26967   void *X509V3_EXT_d2i(X509_EXTENSION *ext);
26968   void *X509V3_get_d2i(const struct stack_st_X509_EXTENSION *x, int nid, int *crit,
26969                        int *idx);
26970   
26971   X509_EXTENSION *X509V3_EXT_i2d(int ext_nid, int crit, void *ext_struc);
26972   int X509V3_add1_i2d(struct stack_st_X509_EXTENSION **x, int nid, void *value,
26973                       int crit, unsigned long flags);
26974   
26975   
26976   
26977   
26978   
26979   
26980   
26981   void X509V3_EXT_val_prn(BIO *out, struct stack_st_CONF_VALUE *val, int indent,
26982                           int ml);
26983   int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, unsigned long flag,
26984                        int indent);
26985   
26986   int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent);
26987   
26988   int X509V3_extensions_print(BIO *out, const char *title,
26989                               const struct stack_st_X509_EXTENSION *exts,
26990                               unsigned long flag, int indent);
26991   
26992   int X509_check_ca(X509 *x);
26993   int X509_check_purpose(X509 *x, int id, int ca);
26994   int X509_supported_extension(X509_EXTENSION *ex);
26995   int X509_PURPOSE_set(int *p, int purpose);
26996   int X509_check_issued(X509 *issuer, X509 *subject);
26997   int X509_check_akid(const X509 *issuer, const AUTHORITY_KEYID *akid);
26998   void X509_set_proxy_flag(X509 *x);
26999   void X509_set_proxy_pathlen(X509 *x, long l);
27000   long X509_get_proxy_pathlen(X509 *x);
27001   
27002   uint32_t X509_get_extension_flags(X509 *x);
27003   uint32_t X509_get_key_usage(X509 *x);
27004   uint32_t X509_get_extended_key_usage(X509 *x);
27005   const ASN1_OCTET_STRING *X509_get0_subject_key_id(X509 *x);
27006   const ASN1_OCTET_STRING *X509_get0_authority_key_id(X509 *x);
27007   const GENERAL_NAMES *X509_get0_authority_issuer(X509 *x);
27008   const ASN1_INTEGER *X509_get0_authority_serial(X509 *x);
27009   
27010   int X509_PURPOSE_get_count(void);
27011   X509_PURPOSE *X509_PURPOSE_get0(int idx);
27012   int X509_PURPOSE_get_by_sname(const char *sname);
27013   int X509_PURPOSE_get_by_id(int id);
27014   int X509_PURPOSE_add(int id, int trust, int flags,
27015                        int (*ck) (const X509_PURPOSE *, const X509 *, int),
27016                        const char *name, const char *sname, void *arg);
27017   char *X509_PURPOSE_get0_name(const X509_PURPOSE *xp);
27018   char *X509_PURPOSE_get0_sname(const X509_PURPOSE *xp);
27019   int X509_PURPOSE_get_trust(const X509_PURPOSE *xp);
27020   void X509_PURPOSE_cleanup(void);
27021   int X509_PURPOSE_get_id(const X509_PURPOSE *);
27022   
27023   struct stack_st_OPENSSL_STRING *X509_get1_email(X509 *x);
27024   struct stack_st_OPENSSL_STRING *X509_REQ_get1_email(X509_REQ *x);
27025   void X509_email_free(struct stack_st_OPENSSL_STRING *sk);
27026   struct stack_st_OPENSSL_STRING *X509_get1_ocsp(X509 *x);
27027   # 1038 "include/openssl/x509v3.h"
27028   int X509_check_host(X509 *x, const char *chk, size_t chklen,
27029                       unsigned int flags, char **peername);
27030   int X509_check_email(X509 *x, const char *chk, size_t chklen,
27031                        unsigned int flags);
27032   int X509_check_ip(X509 *x, const unsigned char *chk, size_t chklen,
27033                     unsigned int flags);
27034   int X509_check_ip_asc(X509 *x, const char *ipasc, unsigned int flags);
27035   
27036   ASN1_OCTET_STRING *a2i_IPADDRESS(const char *ipasc);
27037   ASN1_OCTET_STRING *a2i_IPADDRESS_NC(const char *ipasc);
27038   int X509V3_NAME_from_section(X509_NAME *nm, struct stack_st_CONF_VALUE *dn_sk,
27039                                unsigned long chtype);
27040   
27041   void X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent);
27042   struct stack_st_X509_POLICY_NODE; typedef int (*sk_X509_POLICY_NODE_compfunc)(const X509_POLICY_NODE * const *a, const X509_POLICY_NODE *const *b); typedef void (*sk_X509_POLICY_NODE_freefunc)(X509_POLICY_NODE *a); typedef X509_POLICY_NODE * (*sk_X509_POLICY_NODE_copyfunc)(const X509_POLICY_NODE *a); static __attribute__((unused)) inline X509_POLICY_NODE *ossl_check_X509_POLICY_NODE_type(X509_POLICY_NODE *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_X509_POLICY_NODE_sk_type(const struct stack_st_X509_POLICY_NODE *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_X509_POLICY_NODE_sk_type(struct stack_st_X509_POLICY_NODE *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_X509_POLICY_NODE_compfunc_type(sk_X509_POLICY_NODE_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_X509_POLICY_NODE_copyfunc_type(sk_X509_POLICY_NODE_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_X509_POLICY_NODE_freefunc_type(sk_X509_POLICY_NODE_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27043   # 1082 "include/openssl/x509v3.h"
27044   typedef struct ASRange_st {
27045       ASN1_INTEGER *min, *max;
27046   } ASRange;
27047   
27048   
27049   
27050   
27051   typedef struct ASIdOrRange_st {
27052       int type;
27053       union {
27054           ASN1_INTEGER *id;
27055           ASRange *range;
27056       } u;
27057   } ASIdOrRange;
27058   
27059   struct stack_st_ASIdOrRange; typedef int (*sk_ASIdOrRange_compfunc)(const ASIdOrRange * const *a, const ASIdOrRange *const *b); typedef void (*sk_ASIdOrRange_freefunc)(ASIdOrRange *a); typedef ASIdOrRange * (*sk_ASIdOrRange_copyfunc)(const ASIdOrRange *a); static __attribute__((unused)) inline ASIdOrRange *ossl_check_ASIdOrRange_type(ASIdOrRange *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_ASIdOrRange_sk_type(const struct stack_st_ASIdOrRange *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_ASIdOrRange_sk_type(struct stack_st_ASIdOrRange *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_ASIdOrRange_compfunc_type(sk_ASIdOrRange_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_ASIdOrRange_copyfunc_type(sk_ASIdOrRange_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_ASIdOrRange_freefunc_type(sk_ASIdOrRange_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27060   # 1125 "include/openssl/x509v3.h"
27061   typedef struct stack_st_ASIdOrRange ASIdOrRanges;
27062   
27063   
27064   
27065   
27066   typedef struct ASIdentifierChoice_st {
27067       int type;
27068       union {
27069           ASN1_NULL *inherit;
27070           ASIdOrRanges *asIdsOrRanges;
27071       } u;
27072   } ASIdentifierChoice;
27073   
27074   typedef struct ASIdentifiers_st {
27075       ASIdentifierChoice *asnum, *rdi;
27076   } ASIdentifiers;
27077   
27078   extern ASRange *ASRange_new(void); extern void ASRange_free(ASRange *a); extern ASRange *d2i_ASRange(ASRange **a, const unsigned char **in, long len); extern int i2d_ASRange(const ASRange *a, unsigned char **out); extern const ASN1_ITEM * ASRange_it(void);
27079   extern ASIdOrRange *ASIdOrRange_new(void); extern void ASIdOrRange_free(ASIdOrRange *a); extern ASIdOrRange *d2i_ASIdOrRange(ASIdOrRange **a, const unsigned char **in, long len); extern int i2d_ASIdOrRange(const ASIdOrRange *a, unsigned char **out); extern const ASN1_ITEM * ASIdOrRange_it(void);
27080   extern ASIdentifierChoice *ASIdentifierChoice_new(void); extern void ASIdentifierChoice_free(ASIdentifierChoice *a); extern ASIdentifierChoice *d2i_ASIdentifierChoice(ASIdentifierChoice **a, const unsigned char **in, long len); extern int i2d_ASIdentifierChoice(const ASIdentifierChoice *a, unsigned char **out); extern const ASN1_ITEM * ASIdentifierChoice_it(void);
27081   extern ASIdentifiers *ASIdentifiers_new(void); extern void ASIdentifiers_free(ASIdentifiers *a); extern ASIdentifiers *d2i_ASIdentifiers(ASIdentifiers **a, const unsigned char **in, long len); extern int i2d_ASIdentifiers(const ASIdentifiers *a, unsigned char **out); extern const ASN1_ITEM * ASIdentifiers_it(void);
27082   
27083   typedef struct IPAddressRange_st {
27084       ASN1_BIT_STRING *min, *max;
27085   } IPAddressRange;
27086   
27087   
27088   
27089   
27090   typedef struct IPAddressOrRange_st {
27091       int type;
27092       union {
27093           ASN1_BIT_STRING *addressPrefix;
27094           IPAddressRange *addressRange;
27095       } u;
27096   } IPAddressOrRange;
27097   
27098   struct stack_st_IPAddressOrRange; typedef int (*sk_IPAddressOrRange_compfunc)(const IPAddressOrRange * const *a, const IPAddressOrRange *const *b); typedef void (*sk_IPAddressOrRange_freefunc)(IPAddressOrRange *a); typedef IPAddressOrRange * (*sk_IPAddressOrRange_copyfunc)(const IPAddressOrRange *a); static __attribute__((unused)) inline IPAddressOrRange *ossl_check_IPAddressOrRange_type(IPAddressOrRange *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_IPAddressOrRange_sk_type(const struct stack_st_IPAddressOrRange *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_IPAddressOrRange_sk_type(struct stack_st_IPAddressOrRange *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_IPAddressOrRange_compfunc_type(sk_IPAddressOrRange_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_IPAddressOrRange_copyfunc_type(sk_IPAddressOrRange_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_IPAddressOrRange_freefunc_type(sk_IPAddressOrRange_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27099   # 1190 "include/openssl/x509v3.h"
27100   typedef struct stack_st_IPAddressOrRange IPAddressOrRanges;
27101   
27102   
27103   
27104   
27105   typedef struct IPAddressChoice_st {
27106       int type;
27107       union {
27108           ASN1_NULL *inherit;
27109           IPAddressOrRanges *addressesOrRanges;
27110       } u;
27111   } IPAddressChoice;
27112   
27113   typedef struct IPAddressFamily_st {
27114       ASN1_OCTET_STRING *addressFamily;
27115       IPAddressChoice *ipAddressChoice;
27116   } IPAddressFamily;
27117   
27118   struct stack_st_IPAddressFamily; typedef int (*sk_IPAddressFamily_compfunc)(const IPAddressFamily * const *a, const IPAddressFamily *const *b); typedef void (*sk_IPAddressFamily_freefunc)(IPAddressFamily *a); typedef IPAddressFamily * (*sk_IPAddressFamily_copyfunc)(const IPAddressFamily *a); static __attribute__((unused)) inline IPAddressFamily *ossl_check_IPAddressFamily_type(IPAddressFamily *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_IPAddressFamily_sk_type(const struct stack_st_IPAddressFamily *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_IPAddressFamily_sk_type(struct stack_st_IPAddressFamily *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_IPAddressFamily_compfunc_type(sk_IPAddressFamily_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_IPAddressFamily_copyfunc_type(sk_IPAddressFamily_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_IPAddressFamily_freefunc_type(sk_IPAddressFamily_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27119   # 1237 "include/openssl/x509v3.h"
27120   typedef struct stack_st_IPAddressFamily IPAddrBlocks;
27121   
27122   extern IPAddressRange *IPAddressRange_new(void); extern void IPAddressRange_free(IPAddressRange *a); extern IPAddressRange *d2i_IPAddressRange(IPAddressRange **a, const unsigned char **in, long len); extern int i2d_IPAddressRange(const IPAddressRange *a, unsigned char **out); extern const ASN1_ITEM * IPAddressRange_it(void);
27123   extern IPAddressOrRange *IPAddressOrRange_new(void); extern void IPAddressOrRange_free(IPAddressOrRange *a); extern IPAddressOrRange *d2i_IPAddressOrRange(IPAddressOrRange **a, const unsigned char **in, long len); extern int i2d_IPAddressOrRange(const IPAddressOrRange *a, unsigned char **out); extern const ASN1_ITEM * IPAddressOrRange_it(void);
27124   extern IPAddressChoice *IPAddressChoice_new(void); extern void IPAddressChoice_free(IPAddressChoice *a); extern IPAddressChoice *d2i_IPAddressChoice(IPAddressChoice **a, const unsigned char **in, long len); extern int i2d_IPAddressChoice(const IPAddressChoice *a, unsigned char **out); extern const ASN1_ITEM * IPAddressChoice_it(void);
27125   extern IPAddressFamily *IPAddressFamily_new(void); extern void IPAddressFamily_free(IPAddressFamily *a); extern IPAddressFamily *d2i_IPAddressFamily(IPAddressFamily **a, const unsigned char **in, long len); extern int i2d_IPAddressFamily(const IPAddressFamily *a, unsigned char **out); extern const ASN1_ITEM * IPAddressFamily_it(void);
27126   # 1264 "include/openssl/x509v3.h"
27127   int X509v3_asid_add_inherit(ASIdentifiers *asid, int which);
27128   int X509v3_asid_add_id_or_range(ASIdentifiers *asid, int which,
27129                                   ASN1_INTEGER *min, ASN1_INTEGER *max);
27130   int X509v3_addr_add_inherit(IPAddrBlocks *addr,
27131                               const unsigned afi, const unsigned *safi);
27132   int X509v3_addr_add_prefix(IPAddrBlocks *addr,
27133                              const unsigned afi, const unsigned *safi,
27134                              unsigned char *a, const int prefixlen);
27135   int X509v3_addr_add_range(IPAddrBlocks *addr,
27136                             const unsigned afi, const unsigned *safi,
27137                             unsigned char *min, unsigned char *max);
27138   unsigned X509v3_addr_get_afi(const IPAddressFamily *f);
27139   int X509v3_addr_get_range(IPAddressOrRange *aor, const unsigned afi,
27140                             unsigned char *min, unsigned char *max,
27141                             const int length);
27142   
27143   
27144   
27145   
27146   int X509v3_asid_is_canonical(ASIdentifiers *asid);
27147   int X509v3_addr_is_canonical(IPAddrBlocks *addr);
27148   int X509v3_asid_canonize(ASIdentifiers *asid);
27149   int X509v3_addr_canonize(IPAddrBlocks *addr);
27150   
27151   
27152   
27153   
27154   int X509v3_asid_inherits(ASIdentifiers *asid);
27155   int X509v3_addr_inherits(IPAddrBlocks *addr);
27156   int X509v3_asid_subset(ASIdentifiers *a, ASIdentifiers *b);
27157   int X509v3_addr_subset(IPAddrBlocks *a, IPAddrBlocks *b);
27158   
27159   
27160   
27161   
27162   int X509v3_asid_validate_path(X509_STORE_CTX *);
27163   int X509v3_addr_validate_path(X509_STORE_CTX *);
27164   int X509v3_asid_validate_resource_set(struct stack_st_X509 *chain,
27165                                         ASIdentifiers *ext,
27166                                         int allow_inheritance);
27167   int X509v3_addr_validate_resource_set(struct stack_st_X509 *chain,
27168                                         IPAddrBlocks *ext, int allow_inheritance);
27169   
27170   
27171   
27172   struct stack_st_ASN1_STRING; typedef int (*sk_ASN1_STRING_compfunc)(const ASN1_STRING * const *a, const ASN1_STRING *const *b); typedef void (*sk_ASN1_STRING_freefunc)(ASN1_STRING *a); typedef ASN1_STRING * (*sk_ASN1_STRING_copyfunc)(const ASN1_STRING *a); static __attribute__((unused)) inline ASN1_STRING *ossl_check_ASN1_STRING_type(ASN1_STRING *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_ASN1_STRING_sk_type(const struct stack_st_ASN1_STRING *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_ASN1_STRING_sk_type(struct stack_st_ASN1_STRING *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_ASN1_STRING_compfunc_type(sk_ASN1_STRING_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_ASN1_STRING_copyfunc_type(sk_ASN1_STRING_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_ASN1_STRING_freefunc_type(sk_ASN1_STRING_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27173   # 1340 "include/openssl/x509v3.h"
27174   typedef struct NamingAuthority_st NAMING_AUTHORITY;
27175   typedef struct ProfessionInfo_st PROFESSION_INFO;
27176   typedef struct Admissions_st ADMISSIONS;
27177   typedef struct AdmissionSyntax_st ADMISSION_SYNTAX;
27178   extern NAMING_AUTHORITY *NAMING_AUTHORITY_new(void); extern void NAMING_AUTHORITY_free(NAMING_AUTHORITY *a); extern NAMING_AUTHORITY *d2i_NAMING_AUTHORITY(NAMING_AUTHORITY **a, const unsigned char **in, long len); extern int i2d_NAMING_AUTHORITY(const NAMING_AUTHORITY *a, unsigned char **out); extern const ASN1_ITEM * NAMING_AUTHORITY_it(void);
27179   extern PROFESSION_INFO *PROFESSION_INFO_new(void); extern void PROFESSION_INFO_free(PROFESSION_INFO *a); extern PROFESSION_INFO *d2i_PROFESSION_INFO(PROFESSION_INFO **a, const unsigned char **in, long len); extern int i2d_PROFESSION_INFO(const PROFESSION_INFO *a, unsigned char **out); extern const ASN1_ITEM * PROFESSION_INFO_it(void);
27180   extern ADMISSIONS *ADMISSIONS_new(void); extern void ADMISSIONS_free(ADMISSIONS *a); extern ADMISSIONS *d2i_ADMISSIONS(ADMISSIONS **a, const unsigned char **in, long len); extern int i2d_ADMISSIONS(const ADMISSIONS *a, unsigned char **out); extern const ASN1_ITEM * ADMISSIONS_it(void);
27181   extern ADMISSION_SYNTAX *ADMISSION_SYNTAX_new(void); extern void ADMISSION_SYNTAX_free(ADMISSION_SYNTAX *a); extern ADMISSION_SYNTAX *d2i_ADMISSION_SYNTAX(ADMISSION_SYNTAX **a, const unsigned char **in, long len); extern int i2d_ADMISSION_SYNTAX(const ADMISSION_SYNTAX *a, unsigned char **out); extern const ASN1_ITEM * ADMISSION_SYNTAX_it(void);
27182   struct stack_st_PROFESSION_INFO; typedef int (*sk_PROFESSION_INFO_compfunc)(const PROFESSION_INFO * const *a, const PROFESSION_INFO *const *b); typedef void (*sk_PROFESSION_INFO_freefunc)(PROFESSION_INFO *a); typedef PROFESSION_INFO * (*sk_PROFESSION_INFO_copyfunc)(const PROFESSION_INFO *a); static __attribute__((unused)) inline PROFESSION_INFO *ossl_check_PROFESSION_INFO_type(PROFESSION_INFO *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_PROFESSION_INFO_sk_type(const struct stack_st_PROFESSION_INFO *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_PROFESSION_INFO_sk_type(struct stack_st_PROFESSION_INFO *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_PROFESSION_INFO_compfunc_type(sk_PROFESSION_INFO_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_PROFESSION_INFO_copyfunc_type(sk_PROFESSION_INFO_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_PROFESSION_INFO_freefunc_type(sk_PROFESSION_INFO_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27183   # 1374 "include/openssl/x509v3.h"
27184   struct stack_st_ADMISSIONS; typedef int (*sk_ADMISSIONS_compfunc)(const ADMISSIONS * const *a, const ADMISSIONS *const *b); typedef void (*sk_ADMISSIONS_freefunc)(ADMISSIONS *a); typedef ADMISSIONS * (*sk_ADMISSIONS_copyfunc)(const ADMISSIONS *a); static __attribute__((unused)) inline ADMISSIONS *ossl_check_ADMISSIONS_type(ADMISSIONS *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_ADMISSIONS_sk_type(const struct stack_st_ADMISSIONS *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_ADMISSIONS_sk_type(struct stack_st_ADMISSIONS *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_ADMISSIONS_compfunc_type(sk_ADMISSIONS_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_ADMISSIONS_copyfunc_type(sk_ADMISSIONS_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_ADMISSIONS_freefunc_type(sk_ADMISSIONS_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27185   # 1401 "include/openssl/x509v3.h"
27186   typedef struct stack_st_PROFESSION_INFO PROFESSION_INFOS;
27187   
27188   const ASN1_OBJECT *NAMING_AUTHORITY_get0_authorityId(
27189       const NAMING_AUTHORITY *n);
27190   const ASN1_IA5STRING *NAMING_AUTHORITY_get0_authorityURL(
27191       const NAMING_AUTHORITY *n);
27192   const ASN1_STRING *NAMING_AUTHORITY_get0_authorityText(
27193       const NAMING_AUTHORITY *n);
27194   void NAMING_AUTHORITY_set0_authorityId(NAMING_AUTHORITY *n,
27195       ASN1_OBJECT* namingAuthorityId);
27196   void NAMING_AUTHORITY_set0_authorityURL(NAMING_AUTHORITY *n,
27197       ASN1_IA5STRING* namingAuthorityUrl);
27198   void NAMING_AUTHORITY_set0_authorityText(NAMING_AUTHORITY *n,
27199       ASN1_STRING* namingAuthorityText);
27200   
27201   const GENERAL_NAME *ADMISSION_SYNTAX_get0_admissionAuthority(
27202       const ADMISSION_SYNTAX *as);
27203   void ADMISSION_SYNTAX_set0_admissionAuthority(
27204       ADMISSION_SYNTAX *as, GENERAL_NAME *aa);
27205   const struct stack_st_ADMISSIONS *ADMISSION_SYNTAX_get0_contentsOfAdmissions(
27206       const ADMISSION_SYNTAX *as);
27207   void ADMISSION_SYNTAX_set0_contentsOfAdmissions(
27208       ADMISSION_SYNTAX *as, struct stack_st_ADMISSIONS *a);
27209   const GENERAL_NAME *ADMISSIONS_get0_admissionAuthority(const ADMISSIONS *a);
27210   void ADMISSIONS_set0_admissionAuthority(ADMISSIONS *a, GENERAL_NAME *aa);
27211   const NAMING_AUTHORITY *ADMISSIONS_get0_namingAuthority(const ADMISSIONS *a);
27212   void ADMISSIONS_set0_namingAuthority(ADMISSIONS *a, NAMING_AUTHORITY *na);
27213   const PROFESSION_INFOS *ADMISSIONS_get0_professionInfos(const ADMISSIONS *a);
27214   void ADMISSIONS_set0_professionInfos(ADMISSIONS *a, PROFESSION_INFOS *pi);
27215   const ASN1_OCTET_STRING *PROFESSION_INFO_get0_addProfessionInfo(
27216       const PROFESSION_INFO *pi);
27217   void PROFESSION_INFO_set0_addProfessionInfo(
27218       PROFESSION_INFO *pi, ASN1_OCTET_STRING *aos);
27219   const NAMING_AUTHORITY *PROFESSION_INFO_get0_namingAuthority(
27220       const PROFESSION_INFO *pi);
27221   void PROFESSION_INFO_set0_namingAuthority(
27222       PROFESSION_INFO *pi, NAMING_AUTHORITY *na);
27223   const struct stack_st_ASN1_STRING *PROFESSION_INFO_get0_professionItems(
27224       const PROFESSION_INFO *pi);
27225   void PROFESSION_INFO_set0_professionItems(
27226       PROFESSION_INFO *pi, struct stack_st_ASN1_STRING *as);
27227   const struct stack_st_ASN1_OBJECT *PROFESSION_INFO_get0_professionOIDs(
27228       const PROFESSION_INFO *pi);
27229   void PROFESSION_INFO_set0_professionOIDs(
27230       PROFESSION_INFO *pi, struct stack_st_ASN1_OBJECT *po);
27231   const ASN1_PRINTABLESTRING *PROFESSION_INFO_get0_registrationNumber(
27232       const PROFESSION_INFO *pi);
27233   void PROFESSION_INFO_set0_registrationNumber(
27234       PROFESSION_INFO *pi, ASN1_PRINTABLESTRING *rn);
27235   # 17 "ssl/ssl_lib.c" 2
27236   # 1 "include/openssl/rand.h" 1
27237   # 12 "include/openssl/rand.h"
27238           
27239   
27240   
27241   
27242   
27243   
27244   
27245   
27246   # 1 "include/openssl/types.h" 1
27247   # 21 "include/openssl/rand.h" 2
27248   
27249   # 1 "include/openssl/randerr.h" 1
27250   # 13 "include/openssl/randerr.h"
27251           
27252   # 23 "include/openssl/rand.h" 2
27253   # 40 "include/openssl/rand.h"
27254   struct rand_meth_st {
27255       int (*seed) (const void *buf, int num);
27256       int (*bytes) (unsigned char *buf, int num);
27257       void (*cleanup) (void);
27258       int (*add) (const void *buf, int num, double randomness);
27259       int (*pseudorand) (unsigned char *buf, int num);
27260       int (*status) (void);
27261   };
27262   
27263   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RAND_set_rand_method(const RAND_METHOD *meth);
27264   __attribute__((deprecated("Since OpenSSL " "3.0"))) const RAND_METHOD *RAND_get_rand_method(void);
27265   
27266   __attribute__((deprecated("Since OpenSSL " "3.0"))) int RAND_set_rand_engine(ENGINE *engine);
27267   
27268   
27269   __attribute__((deprecated("Since OpenSSL " "3.0"))) RAND_METHOD *RAND_OpenSSL(void);
27270   
27271   
27272   
27273   
27274   
27275   int RAND_bytes(unsigned char *buf, int num);
27276   int RAND_priv_bytes(unsigned char *buf, int num);
27277   
27278   
27279   
27280   
27281   
27282   int RAND_priv_bytes_ex(OSSL_LIB_CTX *ctx, unsigned char *buf, size_t num,
27283                          unsigned int strength);
27284   
27285   
27286   
27287   
27288   
27289   int RAND_bytes_ex(OSSL_LIB_CTX *ctx, unsigned char *buf, size_t num,
27290                     unsigned int strength);
27291   
27292   
27293   __attribute__((deprecated("Since OpenSSL " "1.1.0"))) int RAND_pseudo_bytes(unsigned char *buf, int num);
27294   
27295   
27296   EVP_RAND_CTX *RAND_get0_primary(OSSL_LIB_CTX *ctx);
27297   EVP_RAND_CTX *RAND_get0_public(OSSL_LIB_CTX *ctx);
27298   EVP_RAND_CTX *RAND_get0_private(OSSL_LIB_CTX *ctx);
27299   int RAND_set0_public(OSSL_LIB_CTX *ctx, EVP_RAND_CTX *rand);
27300   int RAND_set0_private(OSSL_LIB_CTX *ctx, EVP_RAND_CTX *rand);
27301   
27302   int RAND_set_DRBG_type(OSSL_LIB_CTX *ctx, const char *drbg, const char *propq,
27303                          const char *cipher, const char *digest);
27304   int RAND_set_seed_source_type(OSSL_LIB_CTX *ctx, const char *seed,
27305                                 const char *propq);
27306   
27307   void RAND_seed(const void *buf, int num);
27308   void RAND_keep_random_devices_open(int keep);
27309   
27310   
27311   
27312   
27313   void RAND_add(const void *buf, int num, double randomness);
27314   int RAND_load_file(const char *file, long max_bytes);
27315   int RAND_write_file(const char *file);
27316   const char *RAND_file_name(char *file, size_t num);
27317   int RAND_status(void);
27318   
27319   
27320   
27321   
27322   
27323   
27324   
27325   int RAND_poll(void);
27326   # 18 "ssl/ssl_lib.c" 2
27327   # 1 "include/openssl/ocsp.h" 1
27328   # 17 "include/openssl/ocsp.h"
27329           
27330   # 65 "include/openssl/ocsp.h"
27331   # 1 "include/openssl/ocsperr.h" 1
27332   # 13 "include/openssl/ocsperr.h"
27333           
27334   # 66 "include/openssl/ocsp.h" 2
27335   # 89 "include/openssl/ocsp.h"
27336   typedef struct ocsp_cert_id_st OCSP_CERTID;
27337   typedef struct ocsp_one_request_st OCSP_ONEREQ;
27338   typedef struct ocsp_req_info_st OCSP_REQINFO;
27339   typedef struct ocsp_signature_st OCSP_SIGNATURE;
27340   typedef struct ocsp_request_st OCSP_REQUEST;
27341   
27342   struct stack_st_OCSP_CERTID; typedef int (*sk_OCSP_CERTID_compfunc)(const OCSP_CERTID * const *a, const OCSP_CERTID *const *b); typedef void (*sk_OCSP_CERTID_freefunc)(OCSP_CERTID *a); typedef OCSP_CERTID * (*sk_OCSP_CERTID_copyfunc)(const OCSP_CERTID *a); static __attribute__((unused)) inline OCSP_CERTID *ossl_check_OCSP_CERTID_type(OCSP_CERTID *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_OCSP_CERTID_sk_type(const struct stack_st_OCSP_CERTID *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_OCSP_CERTID_sk_type(struct stack_st_OCSP_CERTID *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_OCSP_CERTID_compfunc_type(sk_OCSP_CERTID_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_OCSP_CERTID_copyfunc_type(sk_OCSP_CERTID_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_OCSP_CERTID_freefunc_type(sk_OCSP_CERTID_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27343   # 121 "include/openssl/ocsp.h"
27344   struct stack_st_OCSP_ONEREQ; typedef int (*sk_OCSP_ONEREQ_compfunc)(const OCSP_ONEREQ * const *a, const OCSP_ONEREQ *const *b); typedef void (*sk_OCSP_ONEREQ_freefunc)(OCSP_ONEREQ *a); typedef OCSP_ONEREQ * (*sk_OCSP_ONEREQ_copyfunc)(const OCSP_ONEREQ *a); static __attribute__((unused)) inline OCSP_ONEREQ *ossl_check_OCSP_ONEREQ_type(OCSP_ONEREQ *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_OCSP_ONEREQ_sk_type(const struct stack_st_OCSP_ONEREQ *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_OCSP_ONEREQ_sk_type(struct stack_st_OCSP_ONEREQ *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_OCSP_ONEREQ_compfunc_type(sk_OCSP_ONEREQ_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_OCSP_ONEREQ_copyfunc_type(sk_OCSP_ONEREQ_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_OCSP_ONEREQ_freefunc_type(sk_OCSP_ONEREQ_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27345   # 156 "include/openssl/ocsp.h"
27346   typedef struct ocsp_resp_bytes_st OCSP_RESPBYTES;
27347   
27348   
27349   
27350   
27351   struct stack_st_OCSP_RESPID; typedef int (*sk_OCSP_RESPID_compfunc)(const OCSP_RESPID * const *a, const OCSP_RESPID *const *b); typedef void (*sk_OCSP_RESPID_freefunc)(OCSP_RESPID *a); typedef OCSP_RESPID * (*sk_OCSP_RESPID_copyfunc)(const OCSP_RESPID *a); static __attribute__((unused)) inline OCSP_RESPID *ossl_check_OCSP_RESPID_type(OCSP_RESPID *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_OCSP_RESPID_sk_type(const struct stack_st_OCSP_RESPID *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_OCSP_RESPID_sk_type(struct stack_st_OCSP_RESPID *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_OCSP_RESPID_compfunc_type(sk_OCSP_RESPID_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_OCSP_RESPID_copyfunc_type(sk_OCSP_RESPID_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_OCSP_RESPID_freefunc_type(sk_OCSP_RESPID_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27352   # 189 "include/openssl/ocsp.h"
27353   typedef struct ocsp_revoked_info_st OCSP_REVOKEDINFO;
27354   
27355   
27356   
27357   
27358   
27359   typedef struct ocsp_cert_status_st OCSP_CERTSTATUS;
27360   typedef struct ocsp_single_response_st OCSP_SINGLERESP;
27361   
27362   struct stack_st_OCSP_SINGLERESP; typedef int (*sk_OCSP_SINGLERESP_compfunc)(const OCSP_SINGLERESP * const *a, const OCSP_SINGLERESP *const *b); typedef void (*sk_OCSP_SINGLERESP_freefunc)(OCSP_SINGLERESP *a); typedef OCSP_SINGLERESP * (*sk_OCSP_SINGLERESP_copyfunc)(const OCSP_SINGLERESP *a); static __attribute__((unused)) inline OCSP_SINGLERESP *ossl_check_OCSP_SINGLERESP_type(OCSP_SINGLERESP *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_OCSP_SINGLERESP_sk_type(const struct stack_st_OCSP_SINGLERESP *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_OCSP_SINGLERESP_sk_type(struct stack_st_OCSP_SINGLERESP *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_OCSP_SINGLERESP_compfunc_type(sk_OCSP_SINGLERESP_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_OCSP_SINGLERESP_copyfunc_type(sk_OCSP_SINGLERESP_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_OCSP_SINGLERESP_freefunc_type(sk_OCSP_SINGLERESP_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27363   # 226 "include/openssl/ocsp.h"
27364   typedef struct ocsp_response_data_st OCSP_RESPDATA;
27365   
27366   typedef struct ocsp_basic_response_st OCSP_BASICRESP;
27367   
27368   typedef struct ocsp_crl_id_st OCSP_CRLID;
27369   typedef struct ocsp_service_locator_st OCSP_SERVICELOC;
27370   # 267 "include/openssl/ocsp.h"
27371   extern OCSP_CERTID *OCSP_CERTID_dup(const OCSP_CERTID *a);
27372   
27373   OSSL_HTTP_REQ_CTX *OCSP_sendreq_new(BIO *io, const char *path,
27374                                       const OCSP_REQUEST *req, int buf_size);
27375   OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, const char *path, OCSP_REQUEST *req);
27376   
27377   
27378   typedef OSSL_HTTP_REQ_CTX OCSP_REQ_CTX;
27379   # 296 "include/openssl/ocsp.h"
27380   OCSP_CERTID *OCSP_cert_to_id(const EVP_MD *dgst, const X509 *subject,
27381                                const X509 *issuer);
27382   
27383   OCSP_CERTID *OCSP_cert_id_new(const EVP_MD *dgst,
27384                                 const X509_NAME *issuerName,
27385                                 const ASN1_BIT_STRING *issuerKey,
27386                                 const ASN1_INTEGER *serialNumber);
27387   
27388   OCSP_ONEREQ *OCSP_request_add0_id(OCSP_REQUEST *req, OCSP_CERTID *cid);
27389   
27390   int OCSP_request_add1_nonce(OCSP_REQUEST *req, unsigned char *val, int len);
27391   int OCSP_basic_add1_nonce(OCSP_BASICRESP *resp, unsigned char *val, int len);
27392   int OCSP_check_nonce(OCSP_REQUEST *req, OCSP_BASICRESP *bs);
27393   int OCSP_copy_nonce(OCSP_BASICRESP *resp, OCSP_REQUEST *req);
27394   
27395   int OCSP_request_set1_name(OCSP_REQUEST *req, const X509_NAME *nm);
27396   int OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert);
27397   
27398   int OCSP_request_sign(OCSP_REQUEST *req,
27399                         X509 *signer,
27400                         EVP_PKEY *key,
27401                         const EVP_MD *dgst,
27402                         struct stack_st_X509 *certs, unsigned long flags);
27403   
27404   int OCSP_response_status(OCSP_RESPONSE *resp);
27405   OCSP_BASICRESP *OCSP_response_get1_basic(OCSP_RESPONSE *resp);
27406   
27407   const ASN1_OCTET_STRING *OCSP_resp_get0_signature(const OCSP_BASICRESP *bs);
27408   const X509_ALGOR *OCSP_resp_get0_tbs_sigalg(const OCSP_BASICRESP *bs);
27409   const OCSP_RESPDATA *OCSP_resp_get0_respdata(const OCSP_BASICRESP *bs);
27410   int OCSP_resp_get0_signer(OCSP_BASICRESP *bs, X509 **signer,
27411                             struct stack_st_X509 *extra_certs);
27412   
27413   int OCSP_resp_count(OCSP_BASICRESP *bs);
27414   OCSP_SINGLERESP *OCSP_resp_get0(OCSP_BASICRESP *bs, int idx);
27415   const ASN1_GENERALIZEDTIME *OCSP_resp_get0_produced_at(const OCSP_BASICRESP* bs);
27416   const struct stack_st_X509 *OCSP_resp_get0_certs(const OCSP_BASICRESP *bs);
27417   int OCSP_resp_get0_id(const OCSP_BASICRESP *bs,
27418                         const ASN1_OCTET_STRING **pid,
27419                         const X509_NAME **pname);
27420   int OCSP_resp_get1_id(const OCSP_BASICRESP *bs,
27421                         ASN1_OCTET_STRING **pid,
27422                         X509_NAME **pname);
27423   
27424   int OCSP_resp_find(OCSP_BASICRESP *bs, OCSP_CERTID *id, int last);
27425   int OCSP_single_get0_status(OCSP_SINGLERESP *single, int *reason,
27426                               ASN1_GENERALIZEDTIME **revtime,
27427                               ASN1_GENERALIZEDTIME **thisupd,
27428                               ASN1_GENERALIZEDTIME **nextupd);
27429   int OCSP_resp_find_status(OCSP_BASICRESP *bs, OCSP_CERTID *id, int *status,
27430                             int *reason,
27431                             ASN1_GENERALIZEDTIME **revtime,
27432                             ASN1_GENERALIZEDTIME **thisupd,
27433                             ASN1_GENERALIZEDTIME **nextupd);
27434   int OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd,
27435                           ASN1_GENERALIZEDTIME *nextupd, long sec, long maxsec);
27436   
27437   int OCSP_request_verify(OCSP_REQUEST *req, struct stack_st_X509 *certs,
27438                           X509_STORE *store, unsigned long flags);
27439   
27440   
27441   
27442   
27443   int OCSP_id_issuer_cmp(const OCSP_CERTID *a, const OCSP_CERTID *b);
27444   int OCSP_id_cmp(const OCSP_CERTID *a, const OCSP_CERTID *b);
27445   
27446   int OCSP_request_onereq_count(OCSP_REQUEST *req);
27447   OCSP_ONEREQ *OCSP_request_onereq_get0(OCSP_REQUEST *req, int i);
27448   OCSP_CERTID *OCSP_onereq_get0_id(OCSP_ONEREQ *one);
27449   int OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd,
27450                         ASN1_OCTET_STRING **pikeyHash,
27451                         ASN1_INTEGER **pserial, OCSP_CERTID *cid);
27452   int OCSP_request_is_signed(OCSP_REQUEST *req);
27453   OCSP_RESPONSE *OCSP_response_create(int status, OCSP_BASICRESP *bs);
27454   OCSP_SINGLERESP *OCSP_basic_add1_status(OCSP_BASICRESP *rsp,
27455                                           OCSP_CERTID *cid,
27456                                           int status, int reason,
27457                                           ASN1_TIME *revtime,
27458                                           ASN1_TIME *thisupd,
27459                                           ASN1_TIME *nextupd);
27460   int OCSP_basic_add1_cert(OCSP_BASICRESP *resp, X509 *cert);
27461   int OCSP_basic_sign(OCSP_BASICRESP *brsp,
27462                       X509 *signer, EVP_PKEY *key, const EVP_MD *dgst,
27463                       struct stack_st_X509 *certs, unsigned long flags);
27464   int OCSP_basic_sign_ctx(OCSP_BASICRESP *brsp,
27465                           X509 *signer, EVP_MD_CTX *ctx,
27466                           struct stack_st_X509 *certs, unsigned long flags);
27467   int OCSP_RESPID_set_by_name(OCSP_RESPID *respid, X509 *cert);
27468   int OCSP_RESPID_set_by_key_ex(OCSP_RESPID *respid, X509 *cert,
27469                                 OSSL_LIB_CTX *libctx, const char *propq);
27470   int OCSP_RESPID_set_by_key(OCSP_RESPID *respid, X509 *cert);
27471   int OCSP_RESPID_match_ex(OCSP_RESPID *respid, X509 *cert, OSSL_LIB_CTX *libctx,
27472                            const char *propq);
27473   int OCSP_RESPID_match(OCSP_RESPID *respid, X509 *cert);
27474   
27475   X509_EXTENSION *OCSP_crlID_new(const char *url, long *n, char *tim);
27476   
27477   X509_EXTENSION *OCSP_accept_responses_new(char **oids);
27478   
27479   X509_EXTENSION *OCSP_archive_cutoff_new(char *tim);
27480   
27481   X509_EXTENSION *OCSP_url_svcloc_new(const X509_NAME *issuer, const char **urls);
27482   
27483   int OCSP_REQUEST_get_ext_count(OCSP_REQUEST *x);
27484   int OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos);
27485   int OCSP_REQUEST_get_ext_by_OBJ(OCSP_REQUEST *x, const ASN1_OBJECT *obj,
27486                                   int lastpos);
27487   int OCSP_REQUEST_get_ext_by_critical(OCSP_REQUEST *x, int crit, int lastpos);
27488   X509_EXTENSION *OCSP_REQUEST_get_ext(OCSP_REQUEST *x, int loc);
27489   X509_EXTENSION *OCSP_REQUEST_delete_ext(OCSP_REQUEST *x, int loc);
27490   void *OCSP_REQUEST_get1_ext_d2i(OCSP_REQUEST *x, int nid, int *crit,
27491                                   int *idx);
27492   int OCSP_REQUEST_add1_ext_i2d(OCSP_REQUEST *x, int nid, void *value, int crit,
27493                                 unsigned long flags);
27494   int OCSP_REQUEST_add_ext(OCSP_REQUEST *x, X509_EXTENSION *ex, int loc);
27495   
27496   int OCSP_ONEREQ_get_ext_count(OCSP_ONEREQ *x);
27497   int OCSP_ONEREQ_get_ext_by_NID(OCSP_ONEREQ *x, int nid, int lastpos);
27498   int OCSP_ONEREQ_get_ext_by_OBJ(OCSP_ONEREQ *x, const ASN1_OBJECT *obj, int lastpos);
27499   int OCSP_ONEREQ_get_ext_by_critical(OCSP_ONEREQ *x, int crit, int lastpos);
27500   X509_EXTENSION *OCSP_ONEREQ_get_ext(OCSP_ONEREQ *x, int loc);
27501   X509_EXTENSION *OCSP_ONEREQ_delete_ext(OCSP_ONEREQ *x, int loc);
27502   void *OCSP_ONEREQ_get1_ext_d2i(OCSP_ONEREQ *x, int nid, int *crit, int *idx);
27503   int OCSP_ONEREQ_add1_ext_i2d(OCSP_ONEREQ *x, int nid, void *value, int crit,
27504                                unsigned long flags);
27505   int OCSP_ONEREQ_add_ext(OCSP_ONEREQ *x, X509_EXTENSION *ex, int loc);
27506   
27507   int OCSP_BASICRESP_get_ext_count(OCSP_BASICRESP *x);
27508   int OCSP_BASICRESP_get_ext_by_NID(OCSP_BASICRESP *x, int nid, int lastpos);
27509   int OCSP_BASICRESP_get_ext_by_OBJ(OCSP_BASICRESP *x, const ASN1_OBJECT *obj,
27510                                     int lastpos);
27511   int OCSP_BASICRESP_get_ext_by_critical(OCSP_BASICRESP *x, int crit,
27512                                          int lastpos);
27513   X509_EXTENSION *OCSP_BASICRESP_get_ext(OCSP_BASICRESP *x, int loc);
27514   X509_EXTENSION *OCSP_BASICRESP_delete_ext(OCSP_BASICRESP *x, int loc);
27515   void *OCSP_BASICRESP_get1_ext_d2i(OCSP_BASICRESP *x, int nid, int *crit,
27516                                     int *idx);
27517   int OCSP_BASICRESP_add1_ext_i2d(OCSP_BASICRESP *x, int nid, void *value,
27518                                   int crit, unsigned long flags);
27519   int OCSP_BASICRESP_add_ext(OCSP_BASICRESP *x, X509_EXTENSION *ex, int loc);
27520   
27521   int OCSP_SINGLERESP_get_ext_count(OCSP_SINGLERESP *x);
27522   int OCSP_SINGLERESP_get_ext_by_NID(OCSP_SINGLERESP *x, int nid, int lastpos);
27523   int OCSP_SINGLERESP_get_ext_by_OBJ(OCSP_SINGLERESP *x, const ASN1_OBJECT *obj,
27524                                      int lastpos);
27525   int OCSP_SINGLERESP_get_ext_by_critical(OCSP_SINGLERESP *x, int crit,
27526                                           int lastpos);
27527   X509_EXTENSION *OCSP_SINGLERESP_get_ext(OCSP_SINGLERESP *x, int loc);
27528   X509_EXTENSION *OCSP_SINGLERESP_delete_ext(OCSP_SINGLERESP *x, int loc);
27529   void *OCSP_SINGLERESP_get1_ext_d2i(OCSP_SINGLERESP *x, int nid, int *crit,
27530                                      int *idx);
27531   int OCSP_SINGLERESP_add1_ext_i2d(OCSP_SINGLERESP *x, int nid, void *value,
27532                                    int crit, unsigned long flags);
27533   int OCSP_SINGLERESP_add_ext(OCSP_SINGLERESP *x, X509_EXTENSION *ex, int loc);
27534   const OCSP_CERTID *OCSP_SINGLERESP_get0_id(const OCSP_SINGLERESP *x);
27535   
27536   extern OCSP_SINGLERESP *OCSP_SINGLERESP_new(void); extern void OCSP_SINGLERESP_free(OCSP_SINGLERESP *a); extern OCSP_SINGLERESP *d2i_OCSP_SINGLERESP(OCSP_SINGLERESP **a, const unsigned char **in, long len); extern int i2d_OCSP_SINGLERESP(const OCSP_SINGLERESP *a, unsigned char **out); extern const ASN1_ITEM * OCSP_SINGLERESP_it(void);
27537   extern OCSP_CERTSTATUS *OCSP_CERTSTATUS_new(void); extern void OCSP_CERTSTATUS_free(OCSP_CERTSTATUS *a); extern OCSP_CERTSTATUS *d2i_OCSP_CERTSTATUS(OCSP_CERTSTATUS **a, const unsigned char **in, long len); extern int i2d_OCSP_CERTSTATUS(const OCSP_CERTSTATUS *a, unsigned char **out); extern const ASN1_ITEM * OCSP_CERTSTATUS_it(void);
27538   extern OCSP_REVOKEDINFO *OCSP_REVOKEDINFO_new(void); extern void OCSP_REVOKEDINFO_free(OCSP_REVOKEDINFO *a); extern OCSP_REVOKEDINFO *d2i_OCSP_REVOKEDINFO(OCSP_REVOKEDINFO **a, const unsigned char **in, long len); extern int i2d_OCSP_REVOKEDINFO(const OCSP_REVOKEDINFO *a, unsigned char **out); extern const ASN1_ITEM * OCSP_REVOKEDINFO_it(void);
27539   extern OCSP_BASICRESP *OCSP_BASICRESP_new(void); extern void OCSP_BASICRESP_free(OCSP_BASICRESP *a); extern OCSP_BASICRESP *d2i_OCSP_BASICRESP(OCSP_BASICRESP **a, const unsigned char **in, long len); extern int i2d_OCSP_BASICRESP(const OCSP_BASICRESP *a, unsigned char **out); extern const ASN1_ITEM * OCSP_BASICRESP_it(void);
27540   extern OCSP_RESPDATA *OCSP_RESPDATA_new(void); extern void OCSP_RESPDATA_free(OCSP_RESPDATA *a); extern OCSP_RESPDATA *d2i_OCSP_RESPDATA(OCSP_RESPDATA **a, const unsigned char **in, long len); extern int i2d_OCSP_RESPDATA(const OCSP_RESPDATA *a, unsigned char **out); extern const ASN1_ITEM * OCSP_RESPDATA_it(void);
27541   extern OCSP_RESPID *OCSP_RESPID_new(void); extern void OCSP_RESPID_free(OCSP_RESPID *a); extern OCSP_RESPID *d2i_OCSP_RESPID(OCSP_RESPID **a, const unsigned char **in, long len); extern int i2d_OCSP_RESPID(const OCSP_RESPID *a, unsigned char **out); extern const ASN1_ITEM * OCSP_RESPID_it(void);
27542   extern OCSP_RESPONSE *OCSP_RESPONSE_new(void); extern void OCSP_RESPONSE_free(OCSP_RESPONSE *a); extern OCSP_RESPONSE *d2i_OCSP_RESPONSE(OCSP_RESPONSE **a, const unsigned char **in, long len); extern int i2d_OCSP_RESPONSE(const OCSP_RESPONSE *a, unsigned char **out); extern const ASN1_ITEM * OCSP_RESPONSE_it(void);
27543   extern OCSP_RESPBYTES *OCSP_RESPBYTES_new(void); extern void OCSP_RESPBYTES_free(OCSP_RESPBYTES *a); extern OCSP_RESPBYTES *d2i_OCSP_RESPBYTES(OCSP_RESPBYTES **a, const unsigned char **in, long len); extern int i2d_OCSP_RESPBYTES(const OCSP_RESPBYTES *a, unsigned char **out); extern const ASN1_ITEM * OCSP_RESPBYTES_it(void);
27544   extern OCSP_ONEREQ *OCSP_ONEREQ_new(void); extern void OCSP_ONEREQ_free(OCSP_ONEREQ *a); extern OCSP_ONEREQ *d2i_OCSP_ONEREQ(OCSP_ONEREQ **a, const unsigned char **in, long len); extern int i2d_OCSP_ONEREQ(const OCSP_ONEREQ *a, unsigned char **out); extern const ASN1_ITEM * OCSP_ONEREQ_it(void);
27545   extern OCSP_CERTID *OCSP_CERTID_new(void); extern void OCSP_CERTID_free(OCSP_CERTID *a); extern OCSP_CERTID *d2i_OCSP_CERTID(OCSP_CERTID **a, const unsigned char **in, long len); extern int i2d_OCSP_CERTID(const OCSP_CERTID *a, unsigned char **out); extern const ASN1_ITEM * OCSP_CERTID_it(void);
27546   extern OCSP_REQUEST *OCSP_REQUEST_new(void); extern void OCSP_REQUEST_free(OCSP_REQUEST *a); extern OCSP_REQUEST *d2i_OCSP_REQUEST(OCSP_REQUEST **a, const unsigned char **in, long len); extern int i2d_OCSP_REQUEST(const OCSP_REQUEST *a, unsigned char **out); extern const ASN1_ITEM * OCSP_REQUEST_it(void);
27547   extern OCSP_SIGNATURE *OCSP_SIGNATURE_new(void); extern void OCSP_SIGNATURE_free(OCSP_SIGNATURE *a); extern OCSP_SIGNATURE *d2i_OCSP_SIGNATURE(OCSP_SIGNATURE **a, const unsigned char **in, long len); extern int i2d_OCSP_SIGNATURE(const OCSP_SIGNATURE *a, unsigned char **out); extern const ASN1_ITEM * OCSP_SIGNATURE_it(void);
27548   extern OCSP_REQINFO *OCSP_REQINFO_new(void); extern void OCSP_REQINFO_free(OCSP_REQINFO *a); extern OCSP_REQINFO *d2i_OCSP_REQINFO(OCSP_REQINFO **a, const unsigned char **in, long len); extern int i2d_OCSP_REQINFO(const OCSP_REQINFO *a, unsigned char **out); extern const ASN1_ITEM * OCSP_REQINFO_it(void);
27549   extern OCSP_CRLID *OCSP_CRLID_new(void); extern void OCSP_CRLID_free(OCSP_CRLID *a); extern OCSP_CRLID *d2i_OCSP_CRLID(OCSP_CRLID **a, const unsigned char **in, long len); extern int i2d_OCSP_CRLID(const OCSP_CRLID *a, unsigned char **out); extern const ASN1_ITEM * OCSP_CRLID_it(void);
27550   extern OCSP_SERVICELOC *OCSP_SERVICELOC_new(void); extern void OCSP_SERVICELOC_free(OCSP_SERVICELOC *a); extern OCSP_SERVICELOC *d2i_OCSP_SERVICELOC(OCSP_SERVICELOC **a, const unsigned char **in, long len); extern int i2d_OCSP_SERVICELOC(const OCSP_SERVICELOC *a, unsigned char **out); extern const ASN1_ITEM * OCSP_SERVICELOC_it(void);
27551   
27552   const char *OCSP_response_status_str(long s);
27553   const char *OCSP_cert_status_str(long s);
27554   const char *OCSP_crl_reason_str(long s);
27555   
27556   int OCSP_REQUEST_print(BIO *bp, OCSP_REQUEST *a, unsigned long flags);
27557   int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE *o, unsigned long flags);
27558   
27559   int OCSP_basic_verify(OCSP_BASICRESP *bs, struct stack_st_X509 *certs,
27560                         X509_STORE *st, unsigned long flags);
27561   # 19 "ssl/ssl_lib.c" 2
27562   
27563   # 1 "include/openssl/engine.h" 1
27564   # 13 "include/openssl/engine.h"
27565           
27566   # 30 "include/openssl/engine.h"
27567   # 1 "include/openssl/ui.h" 1
27568   # 17 "include/openssl/ui.h"
27569           
27570   # 31 "include/openssl/ui.h"
27571   # 1 "include/openssl/types.h" 1
27572   # 32 "include/openssl/ui.h" 2
27573   # 1 "include/openssl/uierr.h" 1
27574   # 13 "include/openssl/uierr.h"
27575           
27576   # 33 "include/openssl/ui.h" 2
27577   # 53 "include/openssl/ui.h"
27578   UI *UI_new(void);
27579   UI *UI_new_method(const UI_METHOD *method);
27580   void UI_free(UI *ui);
27581   # 100 "include/openssl/ui.h"
27582   int UI_add_input_string(UI *ui, const char *prompt, int flags,
27583                           char *result_buf, int minsize, int maxsize);
27584   int UI_dup_input_string(UI *ui, const char *prompt, int flags,
27585                           char *result_buf, int minsize, int maxsize);
27586   int UI_add_verify_string(UI *ui, const char *prompt, int flags,
27587                            char *result_buf, int minsize, int maxsize,
27588                            const char *test_buf);
27589   int UI_dup_verify_string(UI *ui, const char *prompt, int flags,
27590                            char *result_buf, int minsize, int maxsize,
27591                            const char *test_buf);
27592   int UI_add_input_boolean(UI *ui, const char *prompt, const char *action_desc,
27593                            const char *ok_chars, const char *cancel_chars,
27594                            int flags, char *result_buf);
27595   int UI_dup_input_boolean(UI *ui, const char *prompt, const char *action_desc,
27596                            const char *ok_chars, const char *cancel_chars,
27597                            int flags, char *result_buf);
27598   int UI_add_info_string(UI *ui, const char *text);
27599   int UI_dup_info_string(UI *ui, const char *text);
27600   int UI_add_error_string(UI *ui, const char *text);
27601   int UI_dup_error_string(UI *ui, const char *text);
27602   # 164 "include/openssl/ui.h"
27603   char *UI_construct_prompt(UI *ui_method,
27604                             const char *phrase_desc, const char *object_name);
27605   # 178 "include/openssl/ui.h"
27606   void *UI_add_user_data(UI *ui, void *user_data);
27607   
27608   
27609   
27610   
27611   
27612   int UI_dup_user_data(UI *ui, void *user_data);
27613   
27614   void *UI_get0_user_data(UI *ui);
27615   
27616   
27617   const char *UI_get0_result(UI *ui, int i);
27618   int UI_get_result_length(UI *ui, int i);
27619   
27620   
27621   int UI_process(UI *ui);
27622   
27623   
27624   
27625   
27626   
27627   
27628   int UI_ctrl(UI *ui, int cmd, long i, void *p, void (*f) (void));
27629   # 222 "include/openssl/ui.h"
27630   int UI_set_ex_data(UI *r, int idx, void *arg);
27631   void *UI_get_ex_data(const UI *r, int idx);
27632   
27633   
27634   void UI_set_default_method(const UI_METHOD *meth);
27635   const UI_METHOD *UI_get_default_method(void);
27636   const UI_METHOD *UI_get_method(UI *ui);
27637   const UI_METHOD *UI_set_method(UI *ui, const UI_METHOD *meth);
27638   
27639   
27640   
27641   
27642   UI_METHOD *UI_OpenSSL(void);
27643   
27644   
27645   
27646   
27647   
27648   
27649   
27650   const UI_METHOD *UI_null(void);
27651   # 291 "include/openssl/ui.h"
27652   typedef struct ui_string_st UI_STRING;
27653   
27654   struct stack_st_UI_STRING; typedef int (*sk_UI_STRING_compfunc)(const UI_STRING * const *a, const UI_STRING *const *b); typedef void (*sk_UI_STRING_freefunc)(UI_STRING *a); typedef UI_STRING * (*sk_UI_STRING_copyfunc)(const UI_STRING *a); static __attribute__((unused)) inline UI_STRING *ossl_check_UI_STRING_type(UI_STRING *ptr) { return ptr; } static __attribute__((unused)) inline const OPENSSL_STACK *ossl_check_const_UI_STRING_sk_type(const struct stack_st_UI_STRING *sk) { return (const OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_STACK *ossl_check_UI_STRING_sk_type(struct stack_st_UI_STRING *sk) { return (OPENSSL_STACK *)sk; } static __attribute__((unused)) inline OPENSSL_sk_compfunc ossl_check_UI_STRING_compfunc_type(sk_UI_STRING_compfunc cmp) { return (OPENSSL_sk_compfunc)cmp; } static __attribute__((unused)) inline OPENSSL_sk_copyfunc ossl_check_UI_STRING_copyfunc_type(sk_UI_STRING_copyfunc cpy) { return (OPENSSL_sk_copyfunc)cpy; } static __attribute__((unused)) inline OPENSSL_sk_freefunc ossl_check_UI_STRING_freefunc_type(sk_UI_STRING_freefunc fr) { return (OPENSSL_sk_freefunc)fr; }
27655   # 325 "include/openssl/ui.h"
27656   enum UI_string_types {
27657       UIT_NONE = 0,
27658       UIT_PROMPT,
27659       UIT_VERIFY,
27660       UIT_BOOLEAN,
27661       UIT_INFO,
27662       UIT_ERROR
27663   };
27664   
27665   
27666   UI_METHOD *UI_create_method(const char *name);
27667   void UI_destroy_method(UI_METHOD *ui_method);
27668   int UI_method_set_opener(UI_METHOD *method, int (*opener) (UI *ui));
27669   int UI_method_set_writer(UI_METHOD *method,
27670                            int (*writer) (UI *ui, UI_STRING *uis));
27671   int UI_method_set_flusher(UI_METHOD *method, int (*flusher) (UI *ui));
27672   int UI_method_set_reader(UI_METHOD *method,
27673                            int (*reader) (UI *ui, UI_STRING *uis));
27674   int UI_method_set_closer(UI_METHOD *method, int (*closer) (UI *ui));
27675   int UI_method_set_data_duplicator(UI_METHOD *method,
27676                                     void *(*duplicator) (UI *ui, void *ui_data),
27677                                     void (*destructor)(UI *ui, void *ui_data));
27678   int UI_method_set_prompt_constructor(UI_METHOD *method,
27679                                        char *(*prompt_constructor) (UI *ui,
27680                                                                     const char
27681                                                                     *phrase_desc,
27682                                                                     const char
27683                                                                     *object_name));
27684   int UI_method_set_ex_data(UI_METHOD *method, int idx, void *data);
27685   int (*UI_method_get_opener(const UI_METHOD *method)) (UI *);
27686   int (*UI_method_get_writer(const UI_METHOD *method)) (UI *, UI_STRING *);
27687   int (*UI_method_get_flusher(const UI_METHOD *method)) (UI *);
27688   int (*UI_method_get_reader(const UI_METHOD *method)) (UI *, UI_STRING *);
27689   int (*UI_method_get_closer(const UI_METHOD *method)) (UI *);
27690   char *(*UI_method_get_prompt_constructor(const UI_METHOD *method))
27691       (UI *, const char *, const char *);
27692   void *(*UI_method_get_data_duplicator(const UI_METHOD *method)) (UI *, void *);
27693   void (*UI_method_get_data_destructor(const UI_METHOD *method)) (UI *, void *);
27694   const void *UI_method_get_ex_data(const UI_METHOD *method, int idx);
27695   
27696   
27697   
27698   
27699   
27700   
27701   
27702   enum UI_string_types UI_get_string_type(UI_STRING *uis);
27703   
27704   int UI_get_input_flags(UI_STRING *uis);
27705   
27706   const char *UI_get0_output_string(UI_STRING *uis);
27707   
27708   
27709   
27710   
27711   const char *UI_get0_action_string(UI_STRING *uis);
27712   
27713   const char *UI_get0_result_string(UI_STRING *uis);
27714   int UI_get_result_string_length(UI_STRING *uis);
27715   
27716   
27717   
27718   const char *UI_get0_test_string(UI_STRING *uis);
27719   
27720   int UI_get_result_minsize(UI_STRING *uis);
27721   
27722   int UI_get_result_maxsize(UI_STRING *uis);
27723   
27724   int UI_set_result(UI *ui, UI_STRING *uis, const char *result);
27725   int UI_set_result_ex(UI *ui, UI_STRING *uis, const char *result, int len);
27726   
27727   
27728   int UI_UTIL_read_pw_string(char *buf, int length, const char *prompt,
27729                              int verify);
27730   int UI_UTIL_read_pw(char *buf, char *buff, int size, const char *prompt,
27731                       int verify);
27732   UI_METHOD *UI_UTIL_wrap_read_pem_callback(pem_password_cb *cb, int rwflag);
27733   # 31 "include/openssl/engine.h" 2
27734   
27735   
27736   # 1 "include/openssl/types.h" 1
27737   # 34 "include/openssl/engine.h" 2
27738   
27739   
27740   # 1 "include/openssl/engineerr.h" 1
27741   # 13 "include/openssl/engineerr.h"
27742           
27743   # 37 "include/openssl/engine.h" 2
27744   # 257 "include/openssl/engine.h"
27745   typedef struct ENGINE_CMD_DEFN_st {
27746       unsigned int cmd_num;
27747       const char *cmd_name;
27748       const char *cmd_desc;
27749       unsigned int cmd_flags;
27750   } ENGINE_CMD_DEFN;
27751   
27752   
27753   typedef int (*ENGINE_GEN_FUNC_PTR) (void);
27754   
27755   typedef int (*ENGINE_GEN_INT_FUNC_PTR) (ENGINE *);
27756   
27757   typedef int (*ENGINE_CTRL_FUNC_PTR) (ENGINE *, int, long, void *,
27758                                        void (*f) (void));
27759   
27760   typedef EVP_PKEY *(*ENGINE_LOAD_KEY_PTR)(ENGINE *, const char *,
27761                                            UI_METHOD *ui_method,
27762                                            void *callback_data);
27763   typedef int (*ENGINE_SSL_CLIENT_CERT_PTR) (ENGINE *, SSL *ssl,
27764                                              struct stack_st_X509_NAME *ca_dn,
27765                                              X509 **pcert, EVP_PKEY **pkey,
27766                                              struct stack_st_X509 **pother,
27767                                              UI_METHOD *ui_method,
27768                                              void *callback_data);
27769   # 296 "include/openssl/engine.h"
27770   typedef int (*ENGINE_CIPHERS_PTR) (ENGINE *, const EVP_CIPHER **,
27771                                      const int **, int);
27772   typedef int (*ENGINE_DIGESTS_PTR) (ENGINE *, const EVP_MD **, const int **,
27773                                      int);
27774   typedef int (*ENGINE_PKEY_METHS_PTR) (ENGINE *, EVP_PKEY_METHOD **,
27775                                         const int **, int);
27776   typedef int (*ENGINE_PKEY_ASN1_METHS_PTR) (ENGINE *, EVP_PKEY_ASN1_METHOD **,
27777                                              const int **, int);
27778   # 318 "include/openssl/engine.h"
27779   __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_first(void);
27780   __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_last(void);
27781   
27782   
27783   
27784   __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_next(ENGINE *e);
27785   __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_prev(ENGINE *e);
27786   
27787   
27788   
27789   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_add(ENGINE *e);
27790   
27791   
27792   
27793   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_remove(ENGINE *e);
27794   
27795   
27796   
27797   __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_by_id(const char *id);
27798   # 358 "include/openssl/engine.h"
27799   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_load_builtin_engines(void);
27800   
27801   
27802   
27803   
27804   
27805   
27806   
27807   __attribute__((deprecated("Since OpenSSL " "3.0"))) unsigned int ENGINE_get_table_flags(void);
27808   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_set_table_flags(unsigned int flags);
27809   # 378 "include/openssl/engine.h"
27810   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_RSA(ENGINE *e);
27811   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_unregister_RSA(ENGINE *e);
27812   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_register_all_RSA(void);
27813   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_DSA(ENGINE *e);
27814   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_unregister_DSA(ENGINE *e);
27815   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_register_all_DSA(void);
27816   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_EC(ENGINE *e);
27817   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_unregister_EC(ENGINE *e);
27818   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_register_all_EC(void);
27819   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_DH(ENGINE *e);
27820   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_unregister_DH(ENGINE *e);
27821   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_register_all_DH(void);
27822   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_RAND(ENGINE *e);
27823   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_unregister_RAND(ENGINE *e);
27824   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_register_all_RAND(void);
27825   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_ciphers(ENGINE *e);
27826   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_unregister_ciphers(ENGINE *e);
27827   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_register_all_ciphers(void);
27828   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_digests(ENGINE *e);
27829   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_unregister_digests(ENGINE *e);
27830   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_register_all_digests(void);
27831   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_pkey_meths(ENGINE *e);
27832   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_unregister_pkey_meths(ENGINE *e);
27833   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_register_all_pkey_meths(void);
27834   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_pkey_asn1_meths(ENGINE *e);
27835   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_unregister_pkey_asn1_meths(ENGINE *e);
27836   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_register_all_pkey_asn1_meths(void);
27837   # 414 "include/openssl/engine.h"
27838   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_complete(ENGINE *e);
27839   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_register_all_complete(void);
27840   # 429 "include/openssl/engine.h"
27841   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p,
27842                                         void (*f) (void));
27843   # 440 "include/openssl/engine.h"
27844   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_cmd_is_executable(ENGINE *e, int cmd);
27845   # 450 "include/openssl/engine.h"
27846   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name,
27847                                             long i, void *p, void (*f) (void),
27848                                             int cmd_optional);
27849   # 478 "include/openssl/engine.h"
27850   __attribute__((deprecated("Since OpenSSL " "3.0")))
27851   int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
27852                              int cmd_optional);
27853   # 492 "include/openssl/engine.h"
27854   __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_new(void);
27855   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_free(ENGINE *e);
27856   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_up_ref(ENGINE *e);
27857   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_id(ENGINE *e, const char *id);
27858   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_name(ENGINE *e, const char *name);
27859   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth);
27860   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth);
27861   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_EC(ENGINE *e, const EC_KEY_METHOD *ecdsa_meth);
27862   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_DH(ENGINE *e, const DH_METHOD *dh_meth);
27863   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_RAND(ENGINE *e, const RAND_METHOD *rand_meth);
27864   __attribute__((deprecated("Since OpenSSL " "3.0")))
27865   int ENGINE_set_destroy_function(ENGINE *e,ENGINE_GEN_INT_FUNC_PTR destroy_f);
27866   __attribute__((deprecated("Since OpenSSL " "3.0")))
27867   int ENGINE_set_init_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR init_f);
27868   __attribute__((deprecated("Since OpenSSL " "3.0")))
27869   int ENGINE_set_finish_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f);
27870   __attribute__((deprecated("Since OpenSSL " "3.0")))
27871   int ENGINE_set_ctrl_function(ENGINE *e, ENGINE_CTRL_FUNC_PTR ctrl_f);
27872   __attribute__((deprecated("Since OpenSSL " "3.0")))
27873   int ENGINE_set_load_privkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpriv_f);
27874   __attribute__((deprecated("Since OpenSSL " "3.0")))
27875   int ENGINE_set_load_pubkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpub_f);
27876   __attribute__((deprecated("Since OpenSSL " "3.0")))
27877   int ENGINE_set_load_ssl_client_cert_function(ENGINE *e,
27878                                                ENGINE_SSL_CLIENT_CERT_PTR loadssl_f);
27879   __attribute__((deprecated("Since OpenSSL " "3.0")))
27880   int ENGINE_set_ciphers(ENGINE *e, ENGINE_CIPHERS_PTR f);
27881   __attribute__((deprecated("Since OpenSSL " "3.0")))
27882   int ENGINE_set_digests(ENGINE *e, ENGINE_DIGESTS_PTR f);
27883   __attribute__((deprecated("Since OpenSSL " "3.0")))
27884   int ENGINE_set_pkey_meths(ENGINE *e, ENGINE_PKEY_METHS_PTR f);
27885   __attribute__((deprecated("Since OpenSSL " "3.0")))
27886   int ENGINE_set_pkey_asn1_meths(ENGINE *e, ENGINE_PKEY_ASN1_METHS_PTR f);
27887   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_flags(ENGINE *e, int flags);
27888   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_cmd_defns(ENGINE *e,
27889                                                  const ENGINE_CMD_DEFN *defns);
27890   
27891   
27892   
27893   
27894   
27895   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_ex_data(ENGINE *e, int idx, void *arg);
27896   __attribute__((deprecated("Since OpenSSL " "3.0"))) void *ENGINE_get_ex_data(const ENGINE *e, int idx);
27897   # 552 "include/openssl/engine.h"
27898   __attribute__((deprecated("Since OpenSSL " "3.0"))) const char *ENGINE_get_id(const ENGINE *e);
27899   __attribute__((deprecated("Since OpenSSL " "3.0"))) const char *ENGINE_get_name(const ENGINE *e);
27900   __attribute__((deprecated("Since OpenSSL " "3.0"))) const RSA_METHOD *ENGINE_get_RSA(const ENGINE *e);
27901   __attribute__((deprecated("Since OpenSSL " "3.0"))) const DSA_METHOD *ENGINE_get_DSA(const ENGINE *e);
27902   __attribute__((deprecated("Since OpenSSL " "3.0"))) const EC_KEY_METHOD *ENGINE_get_EC(const ENGINE *e);
27903   __attribute__((deprecated("Since OpenSSL " "3.0"))) const DH_METHOD *ENGINE_get_DH(const ENGINE *e);
27904   __attribute__((deprecated("Since OpenSSL " "3.0"))) const RAND_METHOD *ENGINE_get_RAND(const ENGINE *e);
27905   __attribute__((deprecated("Since OpenSSL " "3.0")))
27906   ENGINE_GEN_INT_FUNC_PTR ENGINE_get_destroy_function(const ENGINE *e);
27907   __attribute__((deprecated("Since OpenSSL " "3.0")))
27908   ENGINE_GEN_INT_FUNC_PTR ENGINE_get_init_function(const ENGINE *e);
27909   __attribute__((deprecated("Since OpenSSL " "3.0")))
27910   ENGINE_GEN_INT_FUNC_PTR ENGINE_get_finish_function(const ENGINE *e);
27911   __attribute__((deprecated("Since OpenSSL " "3.0")))
27912   ENGINE_CTRL_FUNC_PTR ENGINE_get_ctrl_function(const ENGINE *e);
27913   __attribute__((deprecated("Since OpenSSL " "3.0")))
27914   ENGINE_LOAD_KEY_PTR ENGINE_get_load_privkey_function(const ENGINE *e);
27915   __attribute__((deprecated("Since OpenSSL " "3.0")))
27916   ENGINE_LOAD_KEY_PTR ENGINE_get_load_pubkey_function(const ENGINE *e);
27917   __attribute__((deprecated("Since OpenSSL " "3.0")))
27918   ENGINE_SSL_CLIENT_CERT_PTR ENGINE_get_ssl_client_cert_function(const ENGINE *e);
27919   __attribute__((deprecated("Since OpenSSL " "3.0")))
27920   ENGINE_CIPHERS_PTR ENGINE_get_ciphers(const ENGINE *e);
27921   __attribute__((deprecated("Since OpenSSL " "3.0")))
27922   ENGINE_DIGESTS_PTR ENGINE_get_digests(const ENGINE *e);
27923   __attribute__((deprecated("Since OpenSSL " "3.0")))
27924   ENGINE_PKEY_METHS_PTR ENGINE_get_pkey_meths(const ENGINE *e);
27925   __attribute__((deprecated("Since OpenSSL " "3.0")))
27926   ENGINE_PKEY_ASN1_METHS_PTR ENGINE_get_pkey_asn1_meths(const ENGINE *e);
27927   __attribute__((deprecated("Since OpenSSL " "3.0")))
27928   const EVP_CIPHER *ENGINE_get_cipher(ENGINE *e, int nid);
27929   __attribute__((deprecated("Since OpenSSL " "3.0")))
27930   const EVP_MD *ENGINE_get_digest(ENGINE *e, int nid);
27931   __attribute__((deprecated("Since OpenSSL " "3.0")))
27932   const EVP_PKEY_METHOD *ENGINE_get_pkey_meth(ENGINE *e, int nid);
27933   __attribute__((deprecated("Since OpenSSL " "3.0")))
27934   const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth(ENGINE *e, int nid);
27935   __attribute__((deprecated("Since OpenSSL " "3.0")))
27936   const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth_str(ENGINE *e,
27937                                                             const char *str,
27938                                                             int len);
27939   __attribute__((deprecated("Since OpenSSL " "3.0")))
27940   const EVP_PKEY_ASN1_METHOD *ENGINE_pkey_asn1_find_str(ENGINE **pe,
27941                                                         const char *str, int len);
27942   __attribute__((deprecated("Since OpenSSL " "3.0")))
27943   const ENGINE_CMD_DEFN *ENGINE_get_cmd_defns(const ENGINE *e);
27944   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_get_flags(const ENGINE *e);
27945   # 620 "include/openssl/engine.h"
27946   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_init(ENGINE *e);
27947   
27948   
27949   
27950   
27951   
27952   
27953   
27954   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_finish(ENGINE *e);
27955   # 637 "include/openssl/engine.h"
27956   __attribute__((deprecated("Since OpenSSL " "3.0")))
27957   EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
27958                                     UI_METHOD *ui_method, void *callback_data);
27959   __attribute__((deprecated("Since OpenSSL " "3.0")))
27960   EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id,
27961                                    UI_METHOD *ui_method, void *callback_data);
27962   __attribute__((deprecated("Since OpenSSL " "3.0")))
27963   int ENGINE_load_ssl_client_cert(ENGINE *e, SSL *s, struct stack_st_X509_NAME *ca_dn,
27964                                   X509 **pcert, EVP_PKEY **ppkey,
27965                                   struct stack_st_X509 **pother,
27966                                   UI_METHOD *ui_method, void *callback_data);
27967   # 657 "include/openssl/engine.h"
27968   __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_default_RSA(void);
27969   
27970   
27971   
27972   __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_default_DSA(void);
27973   __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_default_EC(void);
27974   __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_default_DH(void);
27975   __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_default_RAND(void);
27976   
27977   
27978   
27979   
27980   
27981   
27982   __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_cipher_engine(int nid);
27983   __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_digest_engine(int nid);
27984   __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_pkey_meth_engine(int nid);
27985   __attribute__((deprecated("Since OpenSSL " "3.0"))) ENGINE *ENGINE_get_pkey_asn1_meth_engine(int nid);
27986   # 684 "include/openssl/engine.h"
27987   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default_RSA(ENGINE *e);
27988   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default_string(ENGINE *e,
27989                                                       const char *def_list);
27990   
27991   
27992   
27993   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default_DSA(ENGINE *e);
27994   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default_EC(ENGINE *e);
27995   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default_DH(ENGINE *e);
27996   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default_RAND(ENGINE *e);
27997   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default_ciphers(ENGINE *e);
27998   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default_digests(ENGINE *e);
27999   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default_pkey_meths(ENGINE *e);
28000   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default_pkey_asn1_meths(ENGINE *e);
28001   # 708 "include/openssl/engine.h"
28002   __attribute__((deprecated("Since OpenSSL " "3.0"))) int ENGINE_set_default(ENGINE *e, unsigned int flags);
28003   __attribute__((deprecated("Since OpenSSL " "3.0"))) void ENGINE_add_conf_module(void);
28004   # 738 "include/openssl/engine.h"
28005   typedef void *(*dyn_MEM_malloc_fn) (size_t, const char *, int);
28006   typedef void *(*dyn_MEM_realloc_fn) (void *, size_t, const char *, int);
28007   typedef void (*dyn_MEM_free_fn) (void *, const char *, int);
28008   typedef struct st_dynamic_MEM_fns {
28009       dyn_MEM_malloc_fn malloc_fn;
28010       dyn_MEM_realloc_fn realloc_fn;
28011       dyn_MEM_free_fn free_fn;
28012   } dynamic_MEM_fns;
28013   
28014   
28015   
28016   
28017   
28018   typedef struct st_dynamic_fns {
28019       void *static_state;
28020       dynamic_MEM_fns mem_fns;
28021   } dynamic_fns;
28022   # 768 "include/openssl/engine.h"
28023   typedef unsigned long (*dynamic_v_check_fn) (unsigned long ossl_version);
28024   # 793 "include/openssl/engine.h"
28025   typedef int (*dynamic_bind_engine) (ENGINE *e, const char *id,
28026                                       const dynamic_fns *fns);
28027   # 820 "include/openssl/engine.h"
28028   void *ENGINE_get_static_state(void);
28029   # 21 "ssl/ssl_lib.c" 2
28030   
28031   
28032   
28033   # 1 "include/openssl/core_names.h" 1
28034   # 16 "include/openssl/core_names.h"
28035           
28036   # 25 "ssl/ssl_lib.c" 2
28037   
28038   
28039   
28040   
28041   
28042   
28043   static int ssl_undefined_function_3(SSL_CONNECTION *sc, unsigned char *r,
28044                                       unsigned char *s, size_t t, size_t *u)
28045   {
28046       return ssl_undefined_function((&(sc)->ssl));
28047   }
28048   
28049   static int ssl_undefined_function_4(SSL_CONNECTION *sc, int r)
28050   {
28051       return ssl_undefined_function((&(sc)->ssl));
28052   }
28053   
28054   static size_t ssl_undefined_function_5(SSL_CONNECTION *sc, const char *r,
28055                                          size_t s, unsigned char *t)
28056   {
28057       return ssl_undefined_function((&(sc)->ssl));
28058   }
28059   
28060   static int ssl_undefined_function_6(int r)
28061   {
28062       return ssl_undefined_function(
28063   # 50 "ssl/ssl_lib.c" 3 4
28064                                    ((void *)0)
28065   # 50 "ssl/ssl_lib.c"
28066                                        );
28067   }
28068   
28069   static int ssl_undefined_function_7(SSL_CONNECTION *sc, unsigned char *r,
28070                                       size_t s, const char *t, size_t u,
28071                                       const unsigned char *v, size_t w, int x)
28072   {
28073       return ssl_undefined_function((&(sc)->ssl));
28074   }
28075   
28076   static int ssl_undefined_function_8(SSL_CONNECTION *sc)
28077   {
28078       return ssl_undefined_function((&(sc)->ssl));
28079   }
28080   
28081   const SSL3_ENC_METHOD ssl3_undef_enc_method = {
28082       ssl_undefined_function_8,
28083       ssl_undefined_function_3,
28084       ssl_undefined_function_4,
28085       ssl_undefined_function_5,
28086       
28087   # 70 "ssl/ssl_lib.c" 3 4
28088      ((void *)0)
28089   # 70 "ssl/ssl_lib.c"
28090          ,
28091       0,
28092       
28093   # 72 "ssl/ssl_lib.c" 3 4
28094      ((void *)0)
28095   # 72 "ssl/ssl_lib.c"
28096          ,
28097       0,
28098       ssl_undefined_function_6,
28099       ssl_undefined_function_7,
28100   };
28101   
28102   struct ssl_async_args {
28103       SSL *s;
28104       void *buf;
28105       size_t num;
28106       enum { READFUNC, WRITEFUNC, OTHERFUNC } type;
28107       union {
28108           int (*func_read) (SSL *, void *, size_t, size_t *);
28109           int (*func_write) (SSL *, const void *, size_t, size_t *);
28110           int (*func_other) (SSL *);
28111       } f;
28112   };
28113   
28114   static const struct {
28115       uint8_t mtype;
28116       uint8_t ord;
28117       int nid;
28118   } dane_mds[] = {
28119       {
28120           0, 0, 0
28121       },
28122       {
28123           1, 1, 672
28124       },
28125       {
28126           2, 2, 674
28127       },
28128   };
28129   
28130   static int dane_ctx_enable(struct dane_ctx_st *dctx)
28131   {
28132       const EVP_MD **mdevp;
28133       uint8_t *mdord;
28134       uint8_t mdmax = 2;
28135       int n = ((int)mdmax) + 1;
28136       size_t i;
28137   
28138       if (dctx->mdevp != 
28139   # 114 "ssl/ssl_lib.c" 3 4
28140                         ((void *)0)
28141   # 114 "ssl/ssl_lib.c"
28142                             )
28143           return 1;
28144   
28145       mdevp = CRYPTO_zalloc(n * sizeof(*mdevp), "ssl/ssl_lib.c", 117);
28146       mdord = CRYPTO_zalloc(n * sizeof(*mdord), "ssl/ssl_lib.c", 118);
28147   
28148       if (mdord == 
28149   # 120 "ssl/ssl_lib.c" 3 4
28150                   ((void *)0) 
28151   # 120 "ssl/ssl_lib.c"
28152                        || mdevp == 
28153   # 120 "ssl/ssl_lib.c" 3 4
28154                                    ((void *)0)
28155   # 120 "ssl/ssl_lib.c"
28156                                        ) {
28157           CRYPTO_free(mdord, "ssl/ssl_lib.c", 121);
28158           CRYPTO_free(mdevp, "ssl/ssl_lib.c", 122);
28159           return 0;
28160       }
28161   
28162   
28163       for (i = 0; i < (sizeof(dane_mds)/sizeof((dane_mds)[0])); ++i) {
28164           const EVP_MD *md;
28165   
28166           if (dane_mds[i].nid == 0 ||
28167               (md = EVP_get_digestbyname(OBJ_nid2sn(dane_mds[i].nid))) == 
28168   # 131 "ssl/ssl_lib.c" 3 4
28169                                                             ((void *)0)
28170   # 131 "ssl/ssl_lib.c"
28171                                                                 )
28172               continue;
28173           mdevp[dane_mds[i].mtype] = md;
28174           mdord[dane_mds[i].mtype] = dane_mds[i].ord;
28175       }
28176   
28177       dctx->mdevp = mdevp;
28178       dctx->mdord = mdord;
28179       dctx->mdmax = mdmax;
28180   
28181       return 1;
28182   }
28183   
28184   static void dane_ctx_final(struct dane_ctx_st *dctx)
28185   {
28186       CRYPTO_free(dctx->mdevp, "ssl/ssl_lib.c", 146);
28187       dctx->mdevp = 
28188   # 147 "ssl/ssl_lib.c" 3 4
28189                    ((void *)0)
28190   # 147 "ssl/ssl_lib.c"
28191                        ;
28192   
28193       CRYPTO_free(dctx->mdord, "ssl/ssl_lib.c", 149);
28194       dctx->mdord = 
28195   # 150 "ssl/ssl_lib.c" 3 4
28196                    ((void *)0)
28197   # 150 "ssl/ssl_lib.c"
28198                        ;
28199       dctx->mdmax = 0;
28200   }
28201   
28202   static void tlsa_free(danetls_record *t)
28203   {
28204       if (t == 
28205   # 156 "ssl/ssl_lib.c" 3 4
28206               ((void *)0)
28207   # 156 "ssl/ssl_lib.c"
28208                   )
28209           return;
28210       CRYPTO_free(t->data, "ssl/ssl_lib.c", 158);
28211       EVP_PKEY_free(t->spki);
28212       CRYPTO_free(t, "ssl/ssl_lib.c", 160);
28213   }
28214   
28215   static void dane_final(SSL_DANE *dane)
28216   {
28217       sk_danetls_record_pop_free(dane->trecs, tlsa_free);
28218       dane->trecs = 
28219   # 166 "ssl/ssl_lib.c" 3 4
28220                    ((void *)0)
28221   # 166 "ssl/ssl_lib.c"
28222                        ;
28223   
28224       OSSL_STACK_OF_X509_free(dane->certs);
28225       dane->certs = 
28226   # 169 "ssl/ssl_lib.c" 3 4
28227                    ((void *)0)
28228   # 169 "ssl/ssl_lib.c"
28229                        ;
28230   
28231       X509_free(dane->mcert);
28232       dane->mcert = 
28233   # 172 "ssl/ssl_lib.c" 3 4
28234                    ((void *)0)
28235   # 172 "ssl/ssl_lib.c"
28236                        ;
28237       dane->mtlsa = 
28238   # 173 "ssl/ssl_lib.c" 3 4
28239                    ((void *)0)
28240   # 173 "ssl/ssl_lib.c"
28241                        ;
28242       dane->mdpth = -1;
28243       dane->pdpth = -1;
28244   }
28245   
28246   
28247   
28248   
28249   static int ssl_dane_dup(SSL_CONNECTION *to, SSL_CONNECTION *from)
28250   {
28251       int num;
28252       int i;
28253   
28254       if (!((&from->dane) != 
28255   # 186 "ssl/ssl_lib.c" 3 4
28256           ((void *)0) 
28257   # 186 "ssl/ssl_lib.c"
28258           && sk_danetls_record_num((&from->dane)->trecs) > 0))
28259           return 1;
28260   
28261       num = sk_danetls_record_num(from->dane.trecs);
28262       dane_final(&to->dane);
28263       to->dane.flags = from->dane.flags;
28264       to->dane.dctx = &((to)->ssl.ctx)->dane;
28265       to->dane.trecs = sk_danetls_record_new_reserve(
28266   # 193 "ssl/ssl_lib.c" 3 4
28267                                                     ((void *)0)
28268   # 193 "ssl/ssl_lib.c"
28269                                                         , num);
28270   
28271       if (to->dane.trecs == 
28272   # 195 "ssl/ssl_lib.c" 3 4
28273                            ((void *)0)
28274   # 195 "ssl/ssl_lib.c"
28275                                ) {
28276           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",196,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
28277   # 196 "ssl/ssl_lib.c" 3 4
28278          ((void *)0)
28279   # 196 "ssl/ssl_lib.c"
28280          );
28281           return 0;
28282       }
28283   
28284       for (i = 0; i < num; ++i) {
28285           danetls_record *t = sk_danetls_record_value(from->dane.trecs, i);
28286   
28287           if (SSL_dane_tlsa_add((&(to)->ssl), t->usage,
28288                                 t->selector, t->mtype, t->data, t->dlen) <= 0)
28289               return 0;
28290       }
28291       return 1;
28292   }
28293   
28294   static int dane_mtype_set(struct dane_ctx_st *dctx,
28295                             const EVP_MD *md, uint8_t mtype, uint8_t ord)
28296   {
28297       int i;
28298   
28299       if (mtype == 0 && md != 
28300   # 215 "ssl/ssl_lib.c" 3 4
28301                                                  ((void *)0)
28302   # 215 "ssl/ssl_lib.c"
28303                                                      ) {
28304           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",216,__func__), ERR_set_error)((20),(173),
28305   # 216 "ssl/ssl_lib.c" 3 4
28306          ((void *)0)
28307   # 216 "ssl/ssl_lib.c"
28308          );
28309           return 0;
28310       }
28311   
28312       if (mtype > dctx->mdmax) {
28313           const EVP_MD **mdevp;
28314           uint8_t *mdord;
28315           int n = ((int)mtype) + 1;
28316   
28317           mdevp = CRYPTO_realloc(dctx->mdevp, n * sizeof(*mdevp), "ssl/ssl_lib.c", 225);
28318           if (mdevp == 
28319   # 226 "ssl/ssl_lib.c" 3 4
28320                       ((void *)0)
28321   # 226 "ssl/ssl_lib.c"
28322                           )
28323               return -1;
28324           dctx->mdevp = mdevp;
28325   
28326           mdord = CRYPTO_realloc(dctx->mdord, n * sizeof(*mdord), "ssl/ssl_lib.c", 230);
28327           if (mdord == 
28328   # 231 "ssl/ssl_lib.c" 3 4
28329                       ((void *)0)
28330   # 231 "ssl/ssl_lib.c"
28331                           )
28332               return -1;
28333           dctx->mdord = mdord;
28334   
28335   
28336           for (i = dctx->mdmax + 1; i < mtype; ++i) {
28337               mdevp[i] = 
28338   # 237 "ssl/ssl_lib.c" 3 4
28339                         ((void *)0)
28340   # 237 "ssl/ssl_lib.c"
28341                             ;
28342               mdord[i] = 0;
28343           }
28344   
28345           dctx->mdmax = mtype;
28346       }
28347   
28348       dctx->mdevp[mtype] = md;
28349   
28350       dctx->mdord[mtype] = (md == 
28351   # 246 "ssl/ssl_lib.c" 3 4
28352                                  ((void *)0)
28353   # 246 "ssl/ssl_lib.c"
28354                                      ) ? 0 : ord;
28355   
28356       return 1;
28357   }
28358   
28359   static const EVP_MD *tlsa_md_get(SSL_DANE *dane, uint8_t mtype)
28360   {
28361       if (mtype > dane->dctx->mdmax)
28362           return 
28363   # 254 "ssl/ssl_lib.c" 3 4
28364                 ((void *)0)
28365   # 254 "ssl/ssl_lib.c"
28366                     ;
28367       return dane->dctx->mdevp[mtype];
28368   }
28369   
28370   static int dane_tlsa_add(SSL_DANE *dane,
28371                            uint8_t usage,
28372                            uint8_t selector,
28373                            uint8_t mtype, const unsigned char *data, size_t dlen)
28374   {
28375       danetls_record *t;
28376       const EVP_MD *md = 
28377   # 264 "ssl/ssl_lib.c" 3 4
28378                         ((void *)0)
28379   # 264 "ssl/ssl_lib.c"
28380                             ;
28381       int ilen = (int)dlen;
28382       int i;
28383       int num;
28384   
28385       if (dane->trecs == 
28386   # 269 "ssl/ssl_lib.c" 3 4
28387                         ((void *)0)
28388   # 269 "ssl/ssl_lib.c"
28389                             ) {
28390           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",270,__func__), ERR_set_error)((20),(175),
28391   # 270 "ssl/ssl_lib.c" 3 4
28392          ((void *)0)
28393   # 270 "ssl/ssl_lib.c"
28394          );
28395           return -1;
28396       }
28397   
28398       if (ilen < 0 || dlen != (size_t)ilen) {
28399           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",275,__func__), ERR_set_error)((20),(189),
28400   # 275 "ssl/ssl_lib.c" 3 4
28401          ((void *)0)
28402   # 275 "ssl/ssl_lib.c"
28403          );
28404           return 0;
28405       }
28406   
28407       if (usage > 3) {
28408           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",280,__func__), ERR_set_error)((20),(184),
28409   # 280 "ssl/ssl_lib.c" 3 4
28410          ((void *)0)
28411   # 280 "ssl/ssl_lib.c"
28412          );
28413           return 0;
28414       }
28415   
28416       if (selector > 1) {
28417           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",285,__func__), ERR_set_error)((20),(202),
28418   # 285 "ssl/ssl_lib.c" 3 4
28419          ((void *)0)
28420   # 285 "ssl/ssl_lib.c"
28421          );
28422           return 0;
28423       }
28424   
28425       if (mtype != 0) {
28426           md = tlsa_md_get(dane, mtype);
28427           if (md == 
28428   # 291 "ssl/ssl_lib.c" 3 4
28429                    ((void *)0)
28430   # 291 "ssl/ssl_lib.c"
28431                        ) {
28432               (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",292,__func__), ERR_set_error)((20),(200),
28433   # 292 "ssl/ssl_lib.c" 3 4
28434              ((void *)0)
28435   # 292 "ssl/ssl_lib.c"
28436              );
28437               return 0;
28438           }
28439       }
28440   
28441       if (md != 
28442   # 297 "ssl/ssl_lib.c" 3 4
28443                ((void *)0) 
28444   # 297 "ssl/ssl_lib.c"
28445                     && dlen != (size_t)EVP_MD_get_size(md)) {
28446           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",298,__func__), ERR_set_error)((20),(192),
28447   # 298 "ssl/ssl_lib.c" 3 4
28448          ((void *)0)
28449   # 298 "ssl/ssl_lib.c"
28450          );
28451           return 0;
28452       }
28453       if (!data) {
28454           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",302,__func__), ERR_set_error)((20),(203),
28455   # 302 "ssl/ssl_lib.c" 3 4
28456          ((void *)0)
28457   # 302 "ssl/ssl_lib.c"
28458          );
28459           return 0;
28460       }
28461   
28462       if ((t = CRYPTO_zalloc(sizeof(*t), "ssl/ssl_lib.c", 306)) == 
28463   # 306 "ssl/ssl_lib.c" 3 4
28464                                              ((void *)0)
28465   # 306 "ssl/ssl_lib.c"
28466                                                  )
28467           return -1;
28468   
28469       t->usage = usage;
28470       t->selector = selector;
28471       t->mtype = mtype;
28472       t->data = CRYPTO_malloc(dlen, "ssl/ssl_lib.c", 312);
28473       if (t->data == 
28474   # 313 "ssl/ssl_lib.c" 3 4
28475                     ((void *)0)
28476   # 313 "ssl/ssl_lib.c"
28477                         ) {
28478           tlsa_free(t);
28479           return -1;
28480       }
28481       memcpy(t->data, data, dlen);
28482       t->dlen = dlen;
28483   
28484   
28485       if (mtype == 0) {
28486           const unsigned char *p = data;
28487           X509 *cert = 
28488   # 323 "ssl/ssl_lib.c" 3 4
28489                       ((void *)0)
28490   # 323 "ssl/ssl_lib.c"
28491                           ;
28492           EVP_PKEY *pkey = 
28493   # 324 "ssl/ssl_lib.c" 3 4
28494                           ((void *)0)
28495   # 324 "ssl/ssl_lib.c"
28496                               ;
28497   
28498           switch (selector) {
28499           case 0:
28500               if (!d2i_X509(&cert, &p, ilen) || p < data ||
28501                   dlen != (size_t)(p - data)) {
28502                   X509_free(cert);
28503                   tlsa_free(t);
28504                   (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",332,__func__), ERR_set_error)((20),(180),
28505   # 332 "ssl/ssl_lib.c" 3 4
28506                  ((void *)0)
28507   # 332 "ssl/ssl_lib.c"
28508                  );
28509                   return 0;
28510               }
28511               if (X509_get0_pubkey(cert) == 
28512   # 335 "ssl/ssl_lib.c" 3 4
28513                                            ((void *)0)
28514   # 335 "ssl/ssl_lib.c"
28515                                                ) {
28516                   X509_free(cert);
28517                   tlsa_free(t);
28518                   (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",338,__func__), ERR_set_error)((20),(180),
28519   # 338 "ssl/ssl_lib.c" 3 4
28520                  ((void *)0)
28521   # 338 "ssl/ssl_lib.c"
28522                  );
28523                   return 0;
28524               }
28525   
28526               if (((((uint32_t)1) << usage) & (((((uint32_t)1) << 0)) | ((((uint32_t)1) << 2)))) == 0) {
28527   # 355 "ssl/ssl_lib.c"
28528                   X509_free(cert);
28529                   break;
28530               }
28531   # 366 "ssl/ssl_lib.c"
28532               if ((dane->certs == 
28533   # 366 "ssl/ssl_lib.c" 3 4
28534                                  ((void *)0) 
28535   # 366 "ssl/ssl_lib.c"
28536                                       &&
28537                    (dane->certs = ((struct stack_st_X509 *)OPENSSL_sk_new_null())) == 
28538   # 367 "ssl/ssl_lib.c" 3 4
28539                                                         ((void *)0)
28540   # 367 "ssl/ssl_lib.c"
28541                                                             ) ||
28542                   !OPENSSL_sk_push(ossl_check_X509_sk_type(dane->certs), ossl_check_X509_type(cert))) {
28543                   (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",369,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
28544   # 369 "ssl/ssl_lib.c" 3 4
28545                  ((void *)0)
28546   # 369 "ssl/ssl_lib.c"
28547                  );
28548                   X509_free(cert);
28549                   tlsa_free(t);
28550                   return -1;
28551               }
28552               break;
28553   
28554           case 1:
28555               if (!d2i_PUBKEY(&pkey, &p, ilen) || p < data ||
28556                   dlen != (size_t)(p - data)) {
28557                   EVP_PKEY_free(pkey);
28558                   tlsa_free(t);
28559                   (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",381,__func__), ERR_set_error)((20),(201),
28560   # 381 "ssl/ssl_lib.c" 3 4
28561                  ((void *)0)
28562   # 381 "ssl/ssl_lib.c"
28563                  );
28564                   return 0;
28565               }
28566   
28567   
28568   
28569   
28570   
28571   
28572               if (usage == 2)
28573                   t->spki = pkey;
28574               else
28575                   EVP_PKEY_free(pkey);
28576               break;
28577           }
28578       }
28579   # 412 "ssl/ssl_lib.c"
28580       num = sk_danetls_record_num(dane->trecs);
28581       for (i = 0; i < num; ++i) {
28582           danetls_record *rec = sk_danetls_record_value(dane->trecs, i);
28583   
28584           if (rec->usage > usage)
28585               continue;
28586           if (rec->usage < usage)
28587               break;
28588           if (rec->selector > selector)
28589               continue;
28590           if (rec->selector < selector)
28591               break;
28592           if (dane->dctx->mdord[rec->mtype] > dane->dctx->mdord[mtype])
28593               continue;
28594           break;
28595       }
28596   
28597       if (!sk_danetls_record_insert(dane->trecs, t, i)) {
28598           tlsa_free(t);
28599           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",431,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
28600   # 431 "ssl/ssl_lib.c" 3 4
28601          ((void *)0)
28602   # 431 "ssl/ssl_lib.c"
28603          );
28604           return -1;
28605       }
28606       dane->umask |= (((uint32_t)1) << usage);
28607   
28608       return 1;
28609   }
28610   
28611   
28612   
28613   
28614   
28615   static int ssl_check_allowed_versions(int min_version, int max_version)
28616   {
28617       int minisdtls = 0, maxisdtls = 0;
28618   
28619   
28620       if (min_version == 0x0100
28621           || min_version >> 8 == 0xFE)
28622           minisdtls = 1;
28623       if (max_version == 0x0100
28624           || max_version >> 8 == 0xFE)
28625           maxisdtls = 1;
28626   
28627       if ((minisdtls && !maxisdtls && max_version != 0)
28628           || (maxisdtls && !minisdtls && min_version != 0)) {
28629   
28630           return 0;
28631       }
28632   
28633       if (minisdtls || maxisdtls) {
28634   
28635           if (min_version == 0)
28636   
28637               min_version = 0xFEFF;
28638           if (max_version == 0)
28639               max_version = 0xFEFD;
28640   # 477 "ssl/ssl_lib.c"
28641           if (0
28642   # 486 "ssl/ssl_lib.c"
28643               )
28644               return 0;
28645       } else {
28646   
28647           if (min_version == 0)
28648               min_version = 0x0300;
28649           if (max_version == 0)
28650               max_version = 0x0304;
28651   # 511 "ssl/ssl_lib.c"
28652           if (min_version == 0x0300)
28653               min_version = 0x0301;
28654   # 527 "ssl/ssl_lib.c"
28655           if (0
28656   
28657               || (min_version <= 0x0300 && 0x0300 <= max_version)
28658   # 543 "ssl/ssl_lib.c"
28659               )
28660               return 0;
28661       }
28662       return 1;
28663   }
28664   # 561 "ssl/ssl_lib.c"
28665   int SSL_clear(SSL *s)
28666   {
28667       if (s->method == 
28668   # 563 "ssl/ssl_lib.c" 3 4
28669                       ((void *)0)
28670   # 563 "ssl/ssl_lib.c"
28671                           ) {
28672           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",564,__func__), ERR_set_error)((20),(188),
28673   # 564 "ssl/ssl_lib.c" 3 4
28674          ((void *)0)
28675   # 564 "ssl/ssl_lib.c"
28676          );
28677           return 0;
28678       }
28679   
28680       return s->method->ssl_reset(s);
28681   }
28682   
28683   int ossl_ssl_connection_reset(SSL *s)
28684   {
28685       SSL_CONNECTION *sc = ((s) == 
28686   # 573 "ssl/ssl_lib.c" 3 4
28687                           ((void *)0) 
28688   # 573 "ssl/ssl_lib.c"
28689                           ? 
28690   # 573 "ssl/ssl_lib.c" 3 4
28691                           ((void *)0) 
28692   # 573 "ssl/ssl_lib.c"
28693                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
28694   # 573 "ssl/ssl_lib.c" 3 4
28695                           ((void *)0)
28696   # 573 "ssl/ssl_lib.c"
28697                           )));
28698   
28699       if (sc == 
28700   # 575 "ssl/ssl_lib.c" 3 4
28701                ((void *)0)
28702   # 575 "ssl/ssl_lib.c"
28703                    )
28704           return 0;
28705   
28706       if (ssl_clear_bad_session(sc)) {
28707           SSL_SESSION_free(sc->session);
28708           sc->session = 
28709   # 580 "ssl/ssl_lib.c" 3 4
28710                        ((void *)0)
28711   # 580 "ssl/ssl_lib.c"
28712                            ;
28713       }
28714       SSL_SESSION_free(sc->psksession);
28715       sc->psksession = 
28716   # 583 "ssl/ssl_lib.c" 3 4
28717                       ((void *)0)
28718   # 583 "ssl/ssl_lib.c"
28719                           ;
28720       CRYPTO_free(sc->psksession_id, "ssl/ssl_lib.c", 584);
28721       sc->psksession_id = 
28722   # 585 "ssl/ssl_lib.c" 3 4
28723                          ((void *)0)
28724   # 585 "ssl/ssl_lib.c"
28725                              ;
28726       sc->psksession_id_len = 0;
28727       sc->hello_retry_request = SSL_HRR_NONE;
28728       sc->sent_tickets = 0;
28729   
28730       sc->error = 0;
28731       sc->hit = 0;
28732       sc->shutdown = 0;
28733   
28734       if (sc->renegotiate) {
28735           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",595,__func__), ERR_set_error)((20),((259|((0x1 << 18L)|(0x2 << 18L)))),
28736   # 595 "ssl/ssl_lib.c" 3 4
28737          ((void *)0)
28738   # 595 "ssl/ssl_lib.c"
28739          );
28740           return 0;
28741       }
28742   
28743       ossl_statem_clear(sc);
28744   
28745       sc->version = s->method->version;
28746       sc->client_version = sc->version;
28747       sc->rwstate = 1;
28748   
28749       BUF_MEM_free(sc->init_buf);
28750       sc->init_buf = 
28751   # 606 "ssl/ssl_lib.c" 3 4
28752                     ((void *)0)
28753   # 606 "ssl/ssl_lib.c"
28754                         ;
28755       sc->first_packet = 0;
28756   
28757       sc->key_update = -1;
28758       memset(sc->ext.compress_certificate_from_peer, 0,
28759              sizeof(sc->ext.compress_certificate_from_peer));
28760       sc->ext.compress_certificate_sent = 0;
28761   
28762       EVP_MD_CTX_free(sc->pha_dgst);
28763       sc->pha_dgst = 
28764   # 615 "ssl/ssl_lib.c" 3 4
28765                     ((void *)0)
28766   # 615 "ssl/ssl_lib.c"
28767                         ;
28768   
28769   
28770       sc->dane.mdpth = -1;
28771       sc->dane.pdpth = -1;
28772       X509_free(sc->dane.mcert);
28773       sc->dane.mcert = 
28774   # 621 "ssl/ssl_lib.c" 3 4
28775                       ((void *)0)
28776   # 621 "ssl/ssl_lib.c"
28777                           ;
28778       sc->dane.mtlsa = 
28779   # 622 "ssl/ssl_lib.c" 3 4
28780                       ((void *)0)
28781   # 622 "ssl/ssl_lib.c"
28782                           ;
28783   
28784   
28785       X509_VERIFY_PARAM_move_peername(sc->param, 
28786   # 625 "ssl/ssl_lib.c" 3 4
28787                                                 ((void *)0)
28788   # 625 "ssl/ssl_lib.c"
28789                                                     );
28790   
28791   
28792       CRYPTO_free(sc->shared_sigalgs, "ssl/ssl_lib.c", 628);
28793       sc->shared_sigalgs = 
28794   # 629 "ssl/ssl_lib.c" 3 4
28795                           ((void *)0)
28796   # 629 "ssl/ssl_lib.c"
28797                               ;
28798       sc->shared_sigalgslen = 0;
28799   
28800   
28801   
28802   
28803   
28804       if (s->method != s->defltmeth) {
28805           s->method->ssl_deinit(s);
28806           s->method = s->defltmeth;
28807           if (!s->method->ssl_init(s))
28808               return 0;
28809       } else {
28810           if (!s->method->ssl_clear(s))
28811               return 0;
28812       }
28813   
28814       if (!RECORD_LAYER_reset(&sc->rlayer))
28815           return 0;
28816   
28817       return 1;
28818   }
28819   
28820   
28821   
28822   int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth)
28823   {
28824       struct stack_st_SSL_CIPHER *sk;
28825   
28826       if ((((ctx)->method) == OSSL_QUIC_client_method() || ((ctx)->method) == OSSL_QUIC_client_thread_method())) {
28827           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",659,__func__), ERR_set_error)((20),(266),
28828   # 659 "ssl/ssl_lib.c" 3 4
28829          ((void *)0)
28830   # 659 "ssl/ssl_lib.c"
28831          );
28832           return 0;
28833       }
28834   
28835       ctx->method = meth;
28836   
28837       if (!SSL_CTX_set_ciphersuites(ctx, OSSL_default_ciphersuites())) {
28838           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",666,__func__), ERR_set_error)((20),(230),
28839   # 666 "ssl/ssl_lib.c" 3 4
28840          ((void *)0)
28841   # 666 "ssl/ssl_lib.c"
28842          );
28843           return 0;
28844       }
28845       sk = ssl_create_cipher_list(ctx,
28846                                   ctx->tls13_ciphersuites,
28847                                   &(ctx->cipher_list),
28848                                   &(ctx->cipher_list_by_id),
28849                                   OSSL_default_cipher_list(), ctx->cert);
28850       if ((sk == 
28851   # 674 "ssl/ssl_lib.c" 3 4
28852                 ((void *)0)
28853   # 674 "ssl/ssl_lib.c"
28854                     ) || (OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk)) <= 0)) {
28855           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",675,__func__), ERR_set_error)((20),(230),
28856   # 675 "ssl/ssl_lib.c" 3 4
28857          ((void *)0)
28858   # 675 "ssl/ssl_lib.c"
28859          );
28860           return 0;
28861       }
28862       return 1;
28863   }
28864   
28865   
28866   SSL *SSL_new(SSL_CTX *ctx)
28867   {
28868       if (ctx == 
28869   # 684 "ssl/ssl_lib.c" 3 4
28870                 ((void *)0)
28871   # 684 "ssl/ssl_lib.c"
28872                     ) {
28873           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",685,__func__), ERR_set_error)((20),(195),
28874   # 685 "ssl/ssl_lib.c" 3 4
28875          ((void *)0)
28876   # 685 "ssl/ssl_lib.c"
28877          );
28878           return 
28879   # 686 "ssl/ssl_lib.c" 3 4
28880                 ((void *)0)
28881   # 686 "ssl/ssl_lib.c"
28882                     ;
28883       }
28884       if (ctx->method == 
28885   # 688 "ssl/ssl_lib.c" 3 4
28886                         ((void *)0)
28887   # 688 "ssl/ssl_lib.c"
28888                             ) {
28889           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",689,__func__), ERR_set_error)((20),(228),
28890   # 689 "ssl/ssl_lib.c" 3 4
28891          ((void *)0)
28892   # 689 "ssl/ssl_lib.c"
28893          );
28894           return 
28895   # 690 "ssl/ssl_lib.c" 3 4
28896                 ((void *)0)
28897   # 690 "ssl/ssl_lib.c"
28898                     ;
28899       }
28900       return ctx->method->ssl_new(ctx);
28901   }
28902   
28903   int ossl_ssl_init(SSL *ssl, SSL_CTX *ctx, const SSL_METHOD *method, int type)
28904   {
28905       ssl->type = type;
28906   
28907       ssl->lock = CRYPTO_THREAD_lock_new();
28908       if (ssl->lock == 
28909   # 700 "ssl/ssl_lib.c" 3 4
28910                       ((void *)0)
28911   # 700 "ssl/ssl_lib.c"
28912                           )
28913           return 0;
28914   
28915       if (!CRYPTO_NEW_REF(&ssl->references, 1)) {
28916           CRYPTO_THREAD_lock_free(ssl->lock);
28917           return 0;
28918       }
28919   
28920       if (!CRYPTO_new_ex_data(0, ssl, &ssl->ex_data)) {
28921           CRYPTO_THREAD_lock_free(ssl->lock);
28922           CRYPTO_FREE_REF(&ssl->references);
28923           ssl->lock = 
28924   # 711 "ssl/ssl_lib.c" 3 4
28925                      ((void *)0)
28926   # 711 "ssl/ssl_lib.c"
28927                          ;
28928           return 0;
28929       }
28930   
28931       SSL_CTX_up_ref(ctx);
28932       ssl->ctx = ctx;
28933   
28934       ssl->defltmeth = ssl->method = method;
28935   
28936       return 1;
28937   }
28938   
28939   SSL *ossl_ssl_connection_new_int(SSL_CTX *ctx, const SSL_METHOD *method)
28940   {
28941       SSL_CONNECTION *s;
28942       SSL *ssl;
28943   
28944       s = CRYPTO_zalloc(sizeof(*s), "ssl/ssl_lib.c", 728);
28945       if (s == 
28946   # 729 "ssl/ssl_lib.c" 3 4
28947               ((void *)0)
28948   # 729 "ssl/ssl_lib.c"
28949                   )
28950           return 
28951   # 730 "ssl/ssl_lib.c" 3 4
28952                 ((void *)0)
28953   # 730 "ssl/ssl_lib.c"
28954                     ;
28955   
28956       ssl = &s->ssl;
28957       if (!ossl_ssl_init(ssl, ctx, method, 0)) {
28958           CRYPTO_free(s, "ssl/ssl_lib.c", 734);
28959           s = 
28960   # 735 "ssl/ssl_lib.c" 3 4
28961              ((void *)0)
28962   # 735 "ssl/ssl_lib.c"
28963                  ;
28964           ssl = 
28965   # 736 "ssl/ssl_lib.c" 3 4
28966                ((void *)0)
28967   # 736 "ssl/ssl_lib.c"
28968                    ;
28969           goto sslerr;
28970       }
28971   
28972       RECORD_LAYER_init(&s->rlayer, s);
28973   
28974       s->options = ctx->options;
28975   
28976       s->dane.flags = ctx->dane.flags;
28977       if (method->version == ctx->method->version) {
28978           s->min_proto_version = ctx->min_proto_version;
28979           s->max_proto_version = ctx->max_proto_version;
28980       }
28981   
28982       s->mode = ctx->mode;
28983       s->max_cert_list = ctx->max_cert_list;
28984       s->max_early_data = ctx->max_early_data;
28985       s->recv_max_early_data = ctx->recv_max_early_data;
28986   
28987       s->num_tickets = ctx->num_tickets;
28988       s->pha_enabled = ctx->pha_enabled;
28989   
28990   
28991       s->tls13_ciphersuites = ((struct stack_st_SSL_CIPHER *)OPENSSL_sk_dup(ossl_check_const_SSL_CIPHER_sk_type(ctx->tls13_ciphersuites)));
28992       if (s->tls13_ciphersuites == 
28993   # 760 "ssl/ssl_lib.c" 3 4
28994                                   ((void *)0)
28995   # 760 "ssl/ssl_lib.c"
28996                                       )
28997           goto cerr;
28998   # 772 "ssl/ssl_lib.c"
28999       s->cert = ssl_cert_dup(ctx->cert);
29000       if (s->cert == 
29001   # 773 "ssl/ssl_lib.c" 3 4
29002                     ((void *)0)
29003   # 773 "ssl/ssl_lib.c"
29004                         )
29005           goto sslerr;
29006   
29007       ((&s->rlayer)->read_ahead = (ctx->read_ahead));
29008       s->msg_callback = ctx->msg_callback;
29009       s->msg_callback_arg = ctx->msg_callback_arg;
29010       s->verify_mode = ctx->verify_mode;
29011       s->not_resumable_session_cb = ctx->not_resumable_session_cb;
29012       s->rlayer.record_padding_cb = ctx->record_padding_cb;
29013       s->rlayer.record_padding_arg = ctx->record_padding_arg;
29014       s->rlayer.block_padding = ctx->block_padding;
29015       s->sid_ctx_length = ctx->sid_ctx_length;
29016       if (!__builtin_expect(!!((s->sid_ctx_length <= sizeof(s->sid_ctx)) != 0), 1))
29017           goto err;
29018       memcpy(&s->sid_ctx, &ctx->sid_ctx, sizeof(s->sid_ctx));
29019       s->verify_callback = ctx->default_verify_callback;
29020       s->generate_session_id = ctx->generate_session_id;
29021   
29022       s->param = X509_VERIFY_PARAM_new();
29023       if (s->param == 
29024   # 792 "ssl/ssl_lib.c" 3 4
29025                      ((void *)0)
29026   # 792 "ssl/ssl_lib.c"
29027                          )
29028           goto asn1err;
29029       X509_VERIFY_PARAM_inherit(s->param, ctx->param);
29030       s->quiet_shutdown = (((ctx)->method) == OSSL_QUIC_client_method() || ((ctx)->method) == OSSL_QUIC_client_thread_method()) ? 0 : ctx->quiet_shutdown;
29031   
29032       if (!(((ctx)->method) == OSSL_QUIC_client_method() || ((ctx)->method) == OSSL_QUIC_client_thread_method()))
29033           s->ext.max_fragment_len_mode = ctx->ext.max_fragment_len_mode;
29034   
29035       s->max_send_fragment = ctx->max_send_fragment;
29036       s->split_send_fragment = ctx->split_send_fragment;
29037       s->max_pipelines = ctx->max_pipelines;
29038       s->rlayer.default_read_buf_len = ctx->default_read_buf_len;
29039   
29040       s->ext.debug_cb = 0;
29041       s->ext.debug_arg = 
29042   # 806 "ssl/ssl_lib.c" 3 4
29043                         ((void *)0)
29044   # 806 "ssl/ssl_lib.c"
29045                             ;
29046       s->ext.ticket_expected = 0;
29047       s->ext.status_type = ctx->ext.status_type;
29048       s->ext.status_expected = 0;
29049       s->ext.ocsp.ids = 
29050   # 810 "ssl/ssl_lib.c" 3 4
29051                        ((void *)0)
29052   # 810 "ssl/ssl_lib.c"
29053                            ;
29054       s->ext.ocsp.exts = 
29055   # 811 "ssl/ssl_lib.c" 3 4
29056                         ((void *)0)
29057   # 811 "ssl/ssl_lib.c"
29058                             ;
29059       s->ext.ocsp.resp = 
29060   # 812 "ssl/ssl_lib.c" 3 4
29061                         ((void *)0)
29062   # 812 "ssl/ssl_lib.c"
29063                             ;
29064       s->ext.ocsp.resp_len = 0;
29065       SSL_CTX_up_ref(ctx);
29066       s->session_ctx = ctx;
29067       if (ctx->ext.ecpointformats) {
29068           s->ext.ecpointformats =
29069               CRYPTO_memdup((ctx->ext.ecpointformats), ctx->ext.ecpointformats_len, "ssl/ssl_lib.c", 818)
29070                                                          ;
29071           if (!s->ext.ecpointformats) {
29072               s->ext.ecpointformats_len = 0;
29073               goto err;
29074           }
29075           s->ext.ecpointformats_len =
29076               ctx->ext.ecpointformats_len;
29077       }
29078       if (ctx->ext.supportedgroups) {
29079           s->ext.supportedgroups =
29080               CRYPTO_memdup((ctx->ext.supportedgroups), ctx->ext.supportedgroups_len * sizeof(*ctx->ext.supportedgroups), "ssl/ssl_lib.c", 829)
29081   
29082                                                                       ;
29083           if (!s->ext.supportedgroups) {
29084               s->ext.supportedgroups_len = 0;
29085               goto err;
29086           }
29087           s->ext.supportedgroups_len = ctx->ext.supportedgroups_len;
29088       }
29089   
29090   
29091       s->ext.npn = 
29092   # 840 "ssl/ssl_lib.c" 3 4
29093                   ((void *)0)
29094   # 840 "ssl/ssl_lib.c"
29095                       ;
29096   
29097   
29098       if (ctx->ext.alpn != 
29099   # 843 "ssl/ssl_lib.c" 3 4
29100                           ((void *)0)
29101   # 843 "ssl/ssl_lib.c"
29102                               ) {
29103           s->ext.alpn = CRYPTO_malloc(ctx->ext.alpn_len, "ssl/ssl_lib.c", 844);
29104           if (s->ext.alpn == 
29105   # 845 "ssl/ssl_lib.c" 3 4
29106                             ((void *)0)
29107   # 845 "ssl/ssl_lib.c"
29108                                 ) {
29109               s->ext.alpn_len = 0;
29110               goto err;
29111           }
29112           memcpy(s->ext.alpn, ctx->ext.alpn, ctx->ext.alpn_len);
29113           s->ext.alpn_len = ctx->ext.alpn_len;
29114       }
29115   
29116       s->verified_chain = 
29117   # 853 "ssl/ssl_lib.c" 3 4
29118                          ((void *)0)
29119   # 853 "ssl/ssl_lib.c"
29120                              ;
29121       s->verify_result = 0;
29122   
29123       s->default_passwd_callback = ctx->default_passwd_callback;
29124       s->default_passwd_callback_userdata = ctx->default_passwd_callback_userdata;
29125   
29126       s->key_update = -1;
29127   
29128       if (!(((ctx)->method) == OSSL_QUIC_client_method() || ((ctx)->method) == OSSL_QUIC_client_thread_method())) {
29129           s->allow_early_data_cb = ctx->allow_early_data_cb;
29130           s->allow_early_data_cb_data = ctx->allow_early_data_cb_data;
29131       }
29132   
29133       if (!method->ssl_init(ssl))
29134           goto sslerr;
29135   
29136       s->server = (method->ssl_accept == ssl_undefined_function) ? 0 : 1;
29137   
29138       if (!method->ssl_reset(ssl))
29139           goto sslerr;
29140   
29141   
29142       s->psk_client_callback = ctx->psk_client_callback;
29143       s->psk_server_callback = ctx->psk_server_callback;
29144   
29145       s->psk_find_session_cb = ctx->psk_find_session_cb;
29146       s->psk_use_session_cb = ctx->psk_use_session_cb;
29147   
29148       s->async_cb = ctx->async_cb;
29149       s->async_cb_arg = ctx->async_cb_arg;
29150   
29151       s->job = 
29152   # 884 "ssl/ssl_lib.c" 3 4
29153               ((void *)0)
29154   # 884 "ssl/ssl_lib.c"
29155                   ;
29156   
29157   
29158   
29159   
29160       if (ctx->client_cert_type != 
29161   # 889 "ssl/ssl_lib.c" 3 4
29162                                   ((void *)0)
29163   # 889 "ssl/ssl_lib.c"
29164                                       ) {
29165           s->client_cert_type = CRYPTO_memdup((ctx->client_cert_type), ctx->client_cert_type_len, "ssl/ssl_lib.c", 890)
29166                                                                          ;
29167           if (s->client_cert_type == 
29168   # 892 "ssl/ssl_lib.c" 3 4
29169                                     ((void *)0)
29170   # 892 "ssl/ssl_lib.c"
29171                                         )
29172               goto sslerr;
29173           s->client_cert_type_len = ctx->client_cert_type_len;
29174       }
29175       if (ctx->server_cert_type != 
29176   # 896 "ssl/ssl_lib.c" 3 4
29177                                   ((void *)0)
29178   # 896 "ssl/ssl_lib.c"
29179                                       ) {
29180           s->server_cert_type = CRYPTO_memdup((ctx->server_cert_type), ctx->server_cert_type_len, "ssl/ssl_lib.c", 897)
29181                                                                          ;
29182           if (s->server_cert_type == 
29183   # 899 "ssl/ssl_lib.c" 3 4
29184                                     ((void *)0)
29185   # 899 "ssl/ssl_lib.c"
29186                                         )
29187               goto sslerr;
29188           s->server_cert_type_len = ctx->server_cert_type_len;
29189       }
29190   
29191   
29192       if (!SSL_set_ct_validation_callback(ssl, ctx->ct_validation_callback,
29193                                           ctx->ct_validation_callback_arg))
29194           goto sslerr;
29195   
29196   
29197       s->ssl_pkey_num = 9 + ctx->sigalg_list_len;
29198       return ssl;
29199    cerr:
29200       (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",913,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
29201   # 913 "ssl/ssl_lib.c" 3 4
29202      ((void *)0)
29203   # 913 "ssl/ssl_lib.c"
29204      );
29205       goto err;
29206    asn1err:
29207       (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",916,__func__), ERR_set_error)((20),((13 | (0x2 << 18L))),
29208   # 916 "ssl/ssl_lib.c" 3 4
29209      ((void *)0)
29210   # 916 "ssl/ssl_lib.c"
29211      );
29212       goto err;
29213    sslerr:
29214       (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",919,__func__), ERR_set_error)((20),((20 | (0x2 << 18L))),
29215   # 919 "ssl/ssl_lib.c" 3 4
29216      ((void *)0)
29217   # 919 "ssl/ssl_lib.c"
29218      );
29219    err:
29220       SSL_free(ssl);
29221       return 
29222   # 922 "ssl/ssl_lib.c" 3 4
29223             ((void *)0)
29224   # 922 "ssl/ssl_lib.c"
29225                 ;
29226   }
29227   
29228   SSL *ossl_ssl_connection_new(SSL_CTX *ctx)
29229   {
29230       return ossl_ssl_connection_new_int(ctx, ctx->method);
29231   }
29232   
29233   int SSL_is_dtls(const SSL *s)
29234   {
29235       SSL_CONNECTION *sc = ((s) == 
29236   # 932 "ssl/ssl_lib.c" 3 4
29237                           ((void *)0) 
29238   # 932 "ssl/ssl_lib.c"
29239                           ? 
29240   # 932 "ssl/ssl_lib.c" 3 4
29241                           ((void *)0) 
29242   # 932 "ssl/ssl_lib.c"
29243                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
29244   # 932 "ssl/ssl_lib.c" 3 4
29245                           ((void *)0)
29246   # 932 "ssl/ssl_lib.c"
29247                           )));
29248   
29249   
29250       if (s->type == 1 || s->type == 2)
29251           return 0;
29252   
29253   
29254       if (sc == 
29255   # 939 "ssl/ssl_lib.c" 3 4
29256                ((void *)0)
29257   # 939 "ssl/ssl_lib.c"
29258                    )
29259           return 0;
29260   
29261       return ((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8) ? 1 : 0;
29262   }
29263   
29264   int SSL_is_tls(const SSL *s)
29265   {
29266       SSL_CONNECTION *sc = ((s) == 
29267   # 947 "ssl/ssl_lib.c" 3 4
29268                           ((void *)0) 
29269   # 947 "ssl/ssl_lib.c"
29270                           ? 
29271   # 947 "ssl/ssl_lib.c" 3 4
29272                           ((void *)0) 
29273   # 947 "ssl/ssl_lib.c"
29274                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
29275   # 947 "ssl/ssl_lib.c" 3 4
29276                           ((void *)0)
29277   # 947 "ssl/ssl_lib.c"
29278                           )));
29279   
29280   
29281       if (s->type == 1 || s->type == 2)
29282           return 0;
29283   
29284   
29285       if (sc == 
29286   # 954 "ssl/ssl_lib.c" 3 4
29287                ((void *)0)
29288   # 954 "ssl/ssl_lib.c"
29289                    )
29290           return 0;
29291   
29292       return ((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8) ? 0 : 1;
29293   }
29294   
29295   int SSL_is_quic(const SSL *s)
29296   {
29297   
29298       if (s->type == 1 || s->type == 2)
29299           return 1;
29300   
29301       return 0;
29302   }
29303   
29304   int SSL_up_ref(SSL *s)
29305   {
29306       int i;
29307   
29308       if (CRYPTO_UP_REF(&s->references, &i) <= 0)
29309           return 0;
29310   
29311       ((void)0);;
29312       ;
29313       return ((i > 1) ? 1 : 0);
29314   }
29315   
29316   int SSL_CTX_set_session_id_context(SSL_CTX *ctx, const unsigned char *sid_ctx,
29317                                      unsigned int sid_ctx_len)
29318   {
29319       if (sid_ctx_len > 32) {
29320           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",985,__func__), ERR_set_error)((20),(273),
29321   # 985 "ssl/ssl_lib.c" 3 4
29322          ((void *)0)
29323   # 985 "ssl/ssl_lib.c"
29324          );
29325           return 0;
29326       }
29327       ctx->sid_ctx_length = sid_ctx_len;
29328       memcpy(ctx->sid_ctx, sid_ctx, sid_ctx_len);
29329   
29330       return 1;
29331   }
29332   
29333   int SSL_set_session_id_context(SSL *ssl, const unsigned char *sid_ctx,
29334                                  unsigned int sid_ctx_len)
29335   {
29336       SSL_CONNECTION *sc = ((ssl) == 
29337   # 997 "ssl/ssl_lib.c" 3 4
29338                           ((void *)0) 
29339   # 997 "ssl/ssl_lib.c"
29340                           ? 
29341   # 997 "ssl/ssl_lib.c" 3 4
29342                           ((void *)0) 
29343   # 997 "ssl/ssl_lib.c"
29344                           : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls : 
29345   # 997 "ssl/ssl_lib.c" 3 4
29346                           ((void *)0)
29347   # 997 "ssl/ssl_lib.c"
29348                           )));
29349   
29350       if (sc == 
29351   # 999 "ssl/ssl_lib.c" 3 4
29352                ((void *)0)
29353   # 999 "ssl/ssl_lib.c"
29354                    )
29355           return 0;
29356   
29357       if (sid_ctx_len > 32) {
29358           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1003,__func__), ERR_set_error)((20),(273),
29359   # 1003 "ssl/ssl_lib.c" 3 4
29360          ((void *)0)
29361   # 1003 "ssl/ssl_lib.c"
29362          );
29363           return 0;
29364       }
29365       sc->sid_ctx_length = sid_ctx_len;
29366       memcpy(sc->sid_ctx, sid_ctx, sid_ctx_len);
29367   
29368       return 1;
29369   }
29370   
29371   int SSL_CTX_set_generate_session_id(SSL_CTX *ctx, GEN_SESSION_CB cb)
29372   {
29373       if (!CRYPTO_THREAD_write_lock(ctx->lock))
29374           return 0;
29375       ctx->generate_session_id = cb;
29376       CRYPTO_THREAD_unlock(ctx->lock);
29377       return 1;
29378   }
29379   
29380   int SSL_set_generate_session_id(SSL *ssl, GEN_SESSION_CB cb)
29381   {
29382       SSL_CONNECTION *sc = ((ssl) == 
29383   # 1023 "ssl/ssl_lib.c" 3 4
29384                           ((void *)0) 
29385   # 1023 "ssl/ssl_lib.c"
29386                           ? 
29387   # 1023 "ssl/ssl_lib.c" 3 4
29388                           ((void *)0) 
29389   # 1023 "ssl/ssl_lib.c"
29390                           : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls : 
29391   # 1023 "ssl/ssl_lib.c" 3 4
29392                           ((void *)0)
29393   # 1023 "ssl/ssl_lib.c"
29394                           )));
29395   
29396       if (sc == 
29397   # 1025 "ssl/ssl_lib.c" 3 4
29398                ((void *)0) 
29399   # 1025 "ssl/ssl_lib.c"
29400                     || !CRYPTO_THREAD_write_lock(ssl->lock))
29401           return 0;
29402       sc->generate_session_id = cb;
29403       CRYPTO_THREAD_unlock(ssl->lock);
29404       return 1;
29405   }
29406   
29407   int SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id,
29408                                   unsigned int id_len)
29409   {
29410   
29411   
29412   
29413   
29414   
29415   
29416   
29417       SSL_SESSION r, *p;
29418       const SSL_CONNECTION *sc = ((ssl) == 
29419   # 1043 "ssl/ssl_lib.c" 3 4
29420                                 ((void *)0) 
29421   # 1043 "ssl/ssl_lib.c"
29422                                 ? 
29423   # 1043 "ssl/ssl_lib.c" 3 4
29424                                 ((void *)0) 
29425   # 1043 "ssl/ssl_lib.c"
29426                                 : ((ssl)->type == 0 ? (const SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(ssl))->tls : 
29427   # 1043 "ssl/ssl_lib.c" 3 4
29428                                 ((void *)0)
29429   # 1043 "ssl/ssl_lib.c"
29430                                 )));
29431   
29432       if (sc == 
29433   # 1045 "ssl/ssl_lib.c" 3 4
29434                ((void *)0) 
29435   # 1045 "ssl/ssl_lib.c"
29436                     || id_len > sizeof(r.session_id))
29437           return 0;
29438   
29439       r.ssl_version = sc->version;
29440       r.session_id_length = id_len;
29441       memcpy(r.session_id, id, id_len);
29442   
29443       if (!CRYPTO_THREAD_read_lock(sc->session_ctx->lock))
29444           return 0;
29445       p = lh_SSL_SESSION_retrieve(sc->session_ctx->sessions, &r);
29446       CRYPTO_THREAD_unlock(sc->session_ctx->lock);
29447       return (p != 
29448   # 1056 "ssl/ssl_lib.c" 3 4
29449                   ((void *)0)
29450   # 1056 "ssl/ssl_lib.c"
29451                       );
29452   }
29453   
29454   int SSL_CTX_set_purpose(SSL_CTX *s, int purpose)
29455   {
29456       return X509_VERIFY_PARAM_set_purpose(s->param, purpose);
29457   }
29458   
29459   int SSL_set_purpose(SSL *s, int purpose)
29460   {
29461       SSL_CONNECTION *sc = ((s) == 
29462   # 1066 "ssl/ssl_lib.c" 3 4
29463                           ((void *)0) 
29464   # 1066 "ssl/ssl_lib.c"
29465                           ? 
29466   # 1066 "ssl/ssl_lib.c" 3 4
29467                           ((void *)0) 
29468   # 1066 "ssl/ssl_lib.c"
29469                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
29470   # 1066 "ssl/ssl_lib.c" 3 4
29471                           ((void *)0)
29472   # 1066 "ssl/ssl_lib.c"
29473                           )));
29474   
29475       if (sc == 
29476   # 1068 "ssl/ssl_lib.c" 3 4
29477                ((void *)0)
29478   # 1068 "ssl/ssl_lib.c"
29479                    )
29480           return 0;
29481   
29482       return X509_VERIFY_PARAM_set_purpose(sc->param, purpose);
29483   }
29484   
29485   int SSL_CTX_set_trust(SSL_CTX *s, int trust)
29486   {
29487       return X509_VERIFY_PARAM_set_trust(s->param, trust);
29488   }
29489   
29490   int SSL_set_trust(SSL *s, int trust)
29491   {
29492       SSL_CONNECTION *sc = ((s) == 
29493   # 1081 "ssl/ssl_lib.c" 3 4
29494                           ((void *)0) 
29495   # 1081 "ssl/ssl_lib.c"
29496                           ? 
29497   # 1081 "ssl/ssl_lib.c" 3 4
29498                           ((void *)0) 
29499   # 1081 "ssl/ssl_lib.c"
29500                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
29501   # 1081 "ssl/ssl_lib.c" 3 4
29502                           ((void *)0)
29503   # 1081 "ssl/ssl_lib.c"
29504                           )));
29505   
29506       if (sc == 
29507   # 1083 "ssl/ssl_lib.c" 3 4
29508                ((void *)0)
29509   # 1083 "ssl/ssl_lib.c"
29510                    )
29511           return 0;
29512   
29513       return X509_VERIFY_PARAM_set_trust(sc->param, trust);
29514   }
29515   
29516   int SSL_set1_host(SSL *s, const char *hostname)
29517   {
29518       SSL_CONNECTION *sc = ((s) == 
29519   # 1091 "ssl/ssl_lib.c" 3 4
29520                           ((void *)0) 
29521   # 1091 "ssl/ssl_lib.c"
29522                           ? 
29523   # 1091 "ssl/ssl_lib.c" 3 4
29524                           ((void *)0) 
29525   # 1091 "ssl/ssl_lib.c"
29526                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
29527   # 1091 "ssl/ssl_lib.c" 3 4
29528                           ((void *)0)
29529   # 1091 "ssl/ssl_lib.c"
29530                           )));
29531   
29532       if (sc == 
29533   # 1093 "ssl/ssl_lib.c" 3 4
29534                ((void *)0)
29535   # 1093 "ssl/ssl_lib.c"
29536                    )
29537           return 0;
29538   
29539   
29540   
29541       if (hostname != 
29542   # 1098 "ssl/ssl_lib.c" 3 4
29543                      ((void *)0)
29544           
29545   # 1099 "ssl/ssl_lib.c"
29546          && X509_VERIFY_PARAM_set1_ip_asc(sc->param, hostname) == 1)
29547           return 1;
29548   
29549       return X509_VERIFY_PARAM_set1_host(sc->param, hostname, 0);
29550   }
29551   
29552   int SSL_add1_host(SSL *s, const char *hostname)
29553   {
29554       SSL_CONNECTION *sc = ((s) == 
29555   # 1107 "ssl/ssl_lib.c" 3 4
29556                           ((void *)0) 
29557   # 1107 "ssl/ssl_lib.c"
29558                           ? 
29559   # 1107 "ssl/ssl_lib.c" 3 4
29560                           ((void *)0) 
29561   # 1107 "ssl/ssl_lib.c"
29562                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
29563   # 1107 "ssl/ssl_lib.c" 3 4
29564                           ((void *)0)
29565   # 1107 "ssl/ssl_lib.c"
29566                           )));
29567   
29568       if (sc == 
29569   # 1109 "ssl/ssl_lib.c" 3 4
29570                ((void *)0)
29571   # 1109 "ssl/ssl_lib.c"
29572                    )
29573           return 0;
29574   
29575   
29576   
29577       if (hostname)
29578       {
29579           ASN1_OCTET_STRING *ip;
29580           char *old_ip;
29581   
29582           ip = a2i_IPADDRESS(hostname);
29583           if (ip) {
29584   
29585               ASN1_OCTET_STRING_free(ip);
29586   
29587               old_ip = X509_VERIFY_PARAM_get1_ip_asc(sc->param);
29588               if (old_ip)
29589               {
29590                   CRYPTO_free(old_ip, "ssl/ssl_lib.c", 1127);
29591   
29592                   return 0;
29593               }
29594   
29595               return X509_VERIFY_PARAM_set1_ip_asc(sc->param, hostname);
29596           }
29597       }
29598   
29599       return X509_VERIFY_PARAM_add1_host(sc->param, hostname, 0);
29600   }
29601   
29602   void SSL_set_hostflags(SSL *s, unsigned int flags)
29603   {
29604       SSL_CONNECTION *sc = ((s) == 
29605   # 1141 "ssl/ssl_lib.c" 3 4
29606                           ((void *)0) 
29607   # 1141 "ssl/ssl_lib.c"
29608                           ? 
29609   # 1141 "ssl/ssl_lib.c" 3 4
29610                           ((void *)0) 
29611   # 1141 "ssl/ssl_lib.c"
29612                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
29613   # 1141 "ssl/ssl_lib.c" 3 4
29614                           ((void *)0)
29615   # 1141 "ssl/ssl_lib.c"
29616                           )));
29617   
29618       if (sc == 
29619   # 1143 "ssl/ssl_lib.c" 3 4
29620                ((void *)0)
29621   # 1143 "ssl/ssl_lib.c"
29622                    )
29623           return;
29624   
29625       X509_VERIFY_PARAM_set_hostflags(sc->param, flags);
29626   }
29627   
29628   const char *SSL_get0_peername(SSL *s)
29629   {
29630       SSL_CONNECTION *sc = ((s) == 
29631   # 1151 "ssl/ssl_lib.c" 3 4
29632                           ((void *)0) 
29633   # 1151 "ssl/ssl_lib.c"
29634                           ? 
29635   # 1151 "ssl/ssl_lib.c" 3 4
29636                           ((void *)0) 
29637   # 1151 "ssl/ssl_lib.c"
29638                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
29639   # 1151 "ssl/ssl_lib.c" 3 4
29640                           ((void *)0)
29641   # 1151 "ssl/ssl_lib.c"
29642                           )));
29643   
29644       if (sc == 
29645   # 1153 "ssl/ssl_lib.c" 3 4
29646                ((void *)0)
29647   # 1153 "ssl/ssl_lib.c"
29648                    )
29649           return 
29650   # 1154 "ssl/ssl_lib.c" 3 4
29651                 ((void *)0)
29652   # 1154 "ssl/ssl_lib.c"
29653                     ;
29654   
29655       return X509_VERIFY_PARAM_get0_peername(sc->param);
29656   }
29657   
29658   int SSL_CTX_dane_enable(SSL_CTX *ctx)
29659   {
29660       return dane_ctx_enable(&ctx->dane);
29661   }
29662   
29663   unsigned long SSL_CTX_dane_set_flags(SSL_CTX *ctx, unsigned long flags)
29664   {
29665       unsigned long orig = ctx->dane.flags;
29666   
29667       ctx->dane.flags |= flags;
29668       return orig;
29669   }
29670   
29671   unsigned long SSL_CTX_dane_clear_flags(SSL_CTX *ctx, unsigned long flags)
29672   {
29673       unsigned long orig = ctx->dane.flags;
29674   
29675       ctx->dane.flags &= ~flags;
29676       return orig;
29677   }
29678   
29679   int SSL_dane_enable(SSL *s, const char *basedomain)
29680   {
29681       SSL_DANE *dane;
29682       SSL_CONNECTION *sc = ((s) == 
29683   # 1183 "ssl/ssl_lib.c" 3 4
29684                           ((void *)0) 
29685   # 1183 "ssl/ssl_lib.c"
29686                           ? 
29687   # 1183 "ssl/ssl_lib.c" 3 4
29688                           ((void *)0) 
29689   # 1183 "ssl/ssl_lib.c"
29690                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
29691   # 1183 "ssl/ssl_lib.c" 3 4
29692                           ((void *)0)
29693   # 1183 "ssl/ssl_lib.c"
29694                           )));
29695   
29696       if (sc == 
29697   # 1185 "ssl/ssl_lib.c" 3 4
29698                ((void *)0)
29699   # 1185 "ssl/ssl_lib.c"
29700                    )
29701           return 0;
29702   
29703       dane = &sc->dane;
29704       if (s->ctx->dane.mdmax == 0) {
29705           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1190,__func__), ERR_set_error)((20),(167),
29706   # 1190 "ssl/ssl_lib.c" 3 4
29707          ((void *)0)
29708   # 1190 "ssl/ssl_lib.c"
29709          );
29710           return 0;
29711       }
29712       if (dane->trecs != 
29713   # 1193 "ssl/ssl_lib.c" 3 4
29714                         ((void *)0)
29715   # 1193 "ssl/ssl_lib.c"
29716                             ) {
29717           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1194,__func__), ERR_set_error)((20),(172),
29718   # 1194 "ssl/ssl_lib.c" 3 4
29719          ((void *)0)
29720   # 1194 "ssl/ssl_lib.c"
29721          );
29722           return 0;
29723       }
29724   
29725   
29726   
29727   
29728   
29729   
29730       if (sc->ext.hostname == 
29731   # 1203 "ssl/ssl_lib.c" 3 4
29732                              ((void *)0)
29733   # 1203 "ssl/ssl_lib.c"
29734                                  ) {
29735           if (!SSL_ctrl(s,55,0, (void *)basedomain)) {
29736               (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1205,__func__), ERR_set_error)((20),(204),
29737   # 1205 "ssl/ssl_lib.c" 3 4
29738              ((void *)0)
29739   # 1205 "ssl/ssl_lib.c"
29740              );
29741               return -1;
29742           }
29743       }
29744   
29745   
29746       if (!X509_VERIFY_PARAM_set1_host(sc->param, basedomain, 0)) {
29747           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1212,__func__), ERR_set_error)((20),(204),
29748   # 1212 "ssl/ssl_lib.c" 3 4
29749          ((void *)0)
29750   # 1212 "ssl/ssl_lib.c"
29751          );
29752           return -1;
29753       }
29754   
29755       dane->mdpth = -1;
29756       dane->pdpth = -1;
29757       dane->dctx = &s->ctx->dane;
29758       dane->trecs = sk_danetls_record_new_null();
29759   
29760       if (dane->trecs == 
29761   # 1221 "ssl/ssl_lib.c" 3 4
29762                         ((void *)0)
29763   # 1221 "ssl/ssl_lib.c"
29764                             ) {
29765           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1222,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
29766   # 1222 "ssl/ssl_lib.c" 3 4
29767          ((void *)0)
29768   # 1222 "ssl/ssl_lib.c"
29769          );
29770           return -1;
29771       }
29772       return 1;
29773   }
29774   
29775   unsigned long SSL_dane_set_flags(SSL *ssl, unsigned long flags)
29776   {
29777       unsigned long orig;
29778       SSL_CONNECTION *sc = ((ssl) == 
29779   # 1231 "ssl/ssl_lib.c" 3 4
29780                           ((void *)0) 
29781   # 1231 "ssl/ssl_lib.c"
29782                           ? 
29783   # 1231 "ssl/ssl_lib.c" 3 4
29784                           ((void *)0) 
29785   # 1231 "ssl/ssl_lib.c"
29786                           : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls : 
29787   # 1231 "ssl/ssl_lib.c" 3 4
29788                           ((void *)0)
29789   # 1231 "ssl/ssl_lib.c"
29790                           )));
29791   
29792       if (sc == 
29793   # 1233 "ssl/ssl_lib.c" 3 4
29794                ((void *)0)
29795   # 1233 "ssl/ssl_lib.c"
29796                    )
29797           return 0;
29798   
29799       orig = sc->dane.flags;
29800   
29801       sc->dane.flags |= flags;
29802       return orig;
29803   }
29804   
29805   unsigned long SSL_dane_clear_flags(SSL *ssl, unsigned long flags)
29806   {
29807       unsigned long orig;
29808       SSL_CONNECTION *sc = ((ssl) == 
29809   # 1245 "ssl/ssl_lib.c" 3 4
29810                           ((void *)0) 
29811   # 1245 "ssl/ssl_lib.c"
29812                           ? 
29813   # 1245 "ssl/ssl_lib.c" 3 4
29814                           ((void *)0) 
29815   # 1245 "ssl/ssl_lib.c"
29816                           : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls : 
29817   # 1245 "ssl/ssl_lib.c" 3 4
29818                           ((void *)0)
29819   # 1245 "ssl/ssl_lib.c"
29820                           )));
29821   
29822       if (sc == 
29823   # 1247 "ssl/ssl_lib.c" 3 4
29824                ((void *)0)
29825   # 1247 "ssl/ssl_lib.c"
29826                    )
29827           return 0;
29828   
29829       orig = sc->dane.flags;
29830   
29831       sc->dane.flags &= ~flags;
29832       return orig;
29833   }
29834   
29835   int SSL_get0_dane_authority(SSL *s, X509 **mcert, EVP_PKEY **mspki)
29836   {
29837       SSL_DANE *dane;
29838       SSL_CONNECTION *sc = ((s) == 
29839   # 1259 "ssl/ssl_lib.c" 3 4
29840                           ((void *)0) 
29841   # 1259 "ssl/ssl_lib.c"
29842                           ? 
29843   # 1259 "ssl/ssl_lib.c" 3 4
29844                           ((void *)0) 
29845   # 1259 "ssl/ssl_lib.c"
29846                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
29847   # 1259 "ssl/ssl_lib.c" 3 4
29848                           ((void *)0)
29849   # 1259 "ssl/ssl_lib.c"
29850                           )));
29851   
29852       if (sc == 
29853   # 1261 "ssl/ssl_lib.c" 3 4
29854                ((void *)0)
29855   # 1261 "ssl/ssl_lib.c"
29856                    )
29857           return -1;
29858   
29859       dane = &sc->dane;
29860   
29861       if (!((dane) != 
29862   # 1266 "ssl/ssl_lib.c" 3 4
29863           ((void *)0) 
29864   # 1266 "ssl/ssl_lib.c"
29865           && sk_danetls_record_num((dane)->trecs) > 0) || sc->verify_result != 0)
29866           return -1;
29867       if (dane->mtlsa) {
29868           if (mcert)
29869               *mcert = dane->mcert;
29870           if (mspki)
29871               *mspki = (dane->mcert == 
29872   # 1272 "ssl/ssl_lib.c" 3 4
29873                                       ((void *)0)
29874   # 1272 "ssl/ssl_lib.c"
29875                                           ) ? dane->mtlsa->spki : 
29876   # 1272 "ssl/ssl_lib.c" 3 4
29877                                                                   ((void *)0)
29878   # 1272 "ssl/ssl_lib.c"
29879                                                                       ;
29880       }
29881       return dane->mdpth;
29882   }
29883   
29884   int SSL_get0_dane_tlsa(SSL *s, uint8_t *usage, uint8_t *selector,
29885                          uint8_t *mtype, const unsigned char **data, size_t *dlen)
29886   {
29887       SSL_DANE *dane;
29888       SSL_CONNECTION *sc = ((s) == 
29889   # 1281 "ssl/ssl_lib.c" 3 4
29890                           ((void *)0) 
29891   # 1281 "ssl/ssl_lib.c"
29892                           ? 
29893   # 1281 "ssl/ssl_lib.c" 3 4
29894                           ((void *)0) 
29895   # 1281 "ssl/ssl_lib.c"
29896                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
29897   # 1281 "ssl/ssl_lib.c" 3 4
29898                           ((void *)0)
29899   # 1281 "ssl/ssl_lib.c"
29900                           )));
29901   
29902       if (sc == 
29903   # 1283 "ssl/ssl_lib.c" 3 4
29904                ((void *)0)
29905   # 1283 "ssl/ssl_lib.c"
29906                    )
29907           return -1;
29908   
29909       dane = &sc->dane;
29910   
29911       if (!((dane) != 
29912   # 1288 "ssl/ssl_lib.c" 3 4
29913           ((void *)0) 
29914   # 1288 "ssl/ssl_lib.c"
29915           && sk_danetls_record_num((dane)->trecs) > 0) || sc->verify_result != 0)
29916           return -1;
29917       if (dane->mtlsa) {
29918           if (usage)
29919               *usage = dane->mtlsa->usage;
29920           if (selector)
29921               *selector = dane->mtlsa->selector;
29922           if (mtype)
29923               *mtype = dane->mtlsa->mtype;
29924           if (data)
29925               *data = dane->mtlsa->data;
29926           if (dlen)
29927               *dlen = dane->mtlsa->dlen;
29928       }
29929       return dane->mdpth;
29930   }
29931   
29932   SSL_DANE *SSL_get0_dane(SSL *s)
29933   {
29934       SSL_CONNECTION *sc = ((s) == 
29935   # 1307 "ssl/ssl_lib.c" 3 4
29936                           ((void *)0) 
29937   # 1307 "ssl/ssl_lib.c"
29938                           ? 
29939   # 1307 "ssl/ssl_lib.c" 3 4
29940                           ((void *)0) 
29941   # 1307 "ssl/ssl_lib.c"
29942                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
29943   # 1307 "ssl/ssl_lib.c" 3 4
29944                           ((void *)0)
29945   # 1307 "ssl/ssl_lib.c"
29946                           )));
29947   
29948       if (sc == 
29949   # 1309 "ssl/ssl_lib.c" 3 4
29950                ((void *)0)
29951   # 1309 "ssl/ssl_lib.c"
29952                    )
29953           return 
29954   # 1310 "ssl/ssl_lib.c" 3 4
29955                 ((void *)0)
29956   # 1310 "ssl/ssl_lib.c"
29957                     ;
29958   
29959       return &sc->dane;
29960   }
29961   
29962   int SSL_dane_tlsa_add(SSL *s, uint8_t usage, uint8_t selector,
29963                         uint8_t mtype, const unsigned char *data, size_t dlen)
29964   {
29965       SSL_CONNECTION *sc = ((s) == 
29966   # 1318 "ssl/ssl_lib.c" 3 4
29967                           ((void *)0) 
29968   # 1318 "ssl/ssl_lib.c"
29969                           ? 
29970   # 1318 "ssl/ssl_lib.c" 3 4
29971                           ((void *)0) 
29972   # 1318 "ssl/ssl_lib.c"
29973                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
29974   # 1318 "ssl/ssl_lib.c" 3 4
29975                           ((void *)0)
29976   # 1318 "ssl/ssl_lib.c"
29977                           )));
29978   
29979       if (sc == 
29980   # 1320 "ssl/ssl_lib.c" 3 4
29981                ((void *)0)
29982   # 1320 "ssl/ssl_lib.c"
29983                    )
29984           return 0;
29985   
29986       return dane_tlsa_add(&sc->dane, usage, selector, mtype, data, dlen);
29987   }
29988   
29989   int SSL_CTX_dane_mtype_set(SSL_CTX *ctx, const EVP_MD *md, uint8_t mtype,
29990                              uint8_t ord)
29991   {
29992       return dane_mtype_set(&ctx->dane, md, mtype, ord);
29993   }
29994   
29995   int SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm)
29996   {
29997       return X509_VERIFY_PARAM_set1(ctx->param, vpm);
29998   }
29999   
30000   int SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm)
30001   {
30002       SSL_CONNECTION *sc = ((ssl) == 
30003   # 1339 "ssl/ssl_lib.c" 3 4
30004                           ((void *)0) 
30005   # 1339 "ssl/ssl_lib.c"
30006                           ? 
30007   # 1339 "ssl/ssl_lib.c" 3 4
30008                           ((void *)0) 
30009   # 1339 "ssl/ssl_lib.c"
30010                           : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls : 
30011   # 1339 "ssl/ssl_lib.c" 3 4
30012                           ((void *)0)
30013   # 1339 "ssl/ssl_lib.c"
30014                           )));
30015   
30016       if (sc == 
30017   # 1341 "ssl/ssl_lib.c" 3 4
30018                ((void *)0)
30019   # 1341 "ssl/ssl_lib.c"
30020                    )
30021           return 0;
30022   
30023       return X509_VERIFY_PARAM_set1(sc->param, vpm);
30024   }
30025   
30026   X509_VERIFY_PARAM *SSL_CTX_get0_param(SSL_CTX *ctx)
30027   {
30028       return ctx->param;
30029   }
30030   
30031   X509_VERIFY_PARAM *SSL_get0_param(SSL *ssl)
30032   {
30033       SSL_CONNECTION *sc = ((ssl) == 
30034   # 1354 "ssl/ssl_lib.c" 3 4
30035                           ((void *)0) 
30036   # 1354 "ssl/ssl_lib.c"
30037                           ? 
30038   # 1354 "ssl/ssl_lib.c" 3 4
30039                           ((void *)0) 
30040   # 1354 "ssl/ssl_lib.c"
30041                           : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls : 
30042   # 1354 "ssl/ssl_lib.c" 3 4
30043                           ((void *)0)
30044   # 1354 "ssl/ssl_lib.c"
30045                           )));
30046   
30047       if (sc == 
30048   # 1356 "ssl/ssl_lib.c" 3 4
30049                ((void *)0)
30050   # 1356 "ssl/ssl_lib.c"
30051                    )
30052           return 
30053   # 1357 "ssl/ssl_lib.c" 3 4
30054                 ((void *)0)
30055   # 1357 "ssl/ssl_lib.c"
30056                     ;
30057   
30058       return sc->param;
30059   }
30060   
30061   void SSL_certs_clear(SSL *s)
30062   {
30063       SSL_CONNECTION *sc = ((s) == 
30064   # 1364 "ssl/ssl_lib.c" 3 4
30065                           ((void *)0) 
30066   # 1364 "ssl/ssl_lib.c"
30067                           ? 
30068   # 1364 "ssl/ssl_lib.c" 3 4
30069                           ((void *)0) 
30070   # 1364 "ssl/ssl_lib.c"
30071                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
30072   # 1364 "ssl/ssl_lib.c" 3 4
30073                           ((void *)0)
30074   # 1364 "ssl/ssl_lib.c"
30075                           )));
30076   
30077       if (sc == 
30078   # 1366 "ssl/ssl_lib.c" 3 4
30079                ((void *)0)
30080   # 1366 "ssl/ssl_lib.c"
30081                    )
30082           return;
30083   
30084       ssl_cert_clear_certs(sc->cert);
30085   }
30086   
30087   void SSL_free(SSL *s)
30088   {
30089       int i;
30090   
30091       if (s == 
30092   # 1376 "ssl/ssl_lib.c" 3 4
30093               ((void *)0)
30094   # 1376 "ssl/ssl_lib.c"
30095                   )
30096           return;
30097       CRYPTO_DOWN_REF(&s->references, &i);
30098       ((void)0);;
30099       if (i > 0)
30100           return;
30101       ;
30102   
30103       CRYPTO_free_ex_data(0, s, &s->ex_data);
30104   
30105       if (s->method != 
30106   # 1386 "ssl/ssl_lib.c" 3 4
30107                       ((void *)0)
30108   # 1386 "ssl/ssl_lib.c"
30109                           )
30110           s->method->ssl_free(s);
30111   
30112       SSL_CTX_free(s->ctx);
30113       CRYPTO_THREAD_lock_free(s->lock);
30114       CRYPTO_FREE_REF(&s->references);
30115   
30116       CRYPTO_free(s, "ssl/ssl_lib.c", 1393);
30117   }
30118   
30119   void ossl_ssl_connection_free(SSL *ssl)
30120   {
30121       SSL_CONNECTION *s;
30122   
30123       s = ((ssl) == 
30124   # 1400 "ssl/ssl_lib.c" 3 4
30125          ((void *)0) 
30126   # 1400 "ssl/ssl_lib.c"
30127          ? 
30128   # 1400 "ssl/ssl_lib.c" 3 4
30129          ((void *)0) 
30130   # 1400 "ssl/ssl_lib.c"
30131          : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : 
30132   # 1400 "ssl/ssl_lib.c" 3 4
30133          ((void *)0)
30134   # 1400 "ssl/ssl_lib.c"
30135          ));
30136       if (s == 
30137   # 1401 "ssl/ssl_lib.c" 3 4
30138               ((void *)0)
30139   # 1401 "ssl/ssl_lib.c"
30140                   )
30141           return;
30142   
30143       X509_VERIFY_PARAM_free(s->param);
30144       dane_final(&s->dane);
30145   
30146   
30147       ssl_free_wbio_buffer(s);
30148   
30149   
30150       RECORD_LAYER_clear(&s->rlayer);
30151   
30152       BUF_MEM_free(s->init_buf);
30153   
30154   
30155       OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(s->cipher_list));
30156       OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(s->cipher_list_by_id));
30157       OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(s->tls13_ciphersuites));
30158       OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(s->peer_ciphers));
30159   
30160   
30161       if (s->session != 
30162   # 1422 "ssl/ssl_lib.c" 3 4
30163                        ((void *)0)
30164   # 1422 "ssl/ssl_lib.c"
30165                            ) {
30166           ssl_clear_bad_session(s);
30167           SSL_SESSION_free(s->session);
30168       }
30169       SSL_SESSION_free(s->psksession);
30170       CRYPTO_free(s->psksession_id, "ssl/ssl_lib.c", 1427);
30171   
30172       ssl_cert_free(s->cert);
30173       CRYPTO_free(s->shared_sigalgs, "ssl/ssl_lib.c", 1430);
30174   
30175   
30176       CRYPTO_free(s->ext.hostname, "ssl/ssl_lib.c", 1433);
30177       SSL_CTX_free(s->session_ctx);
30178       CRYPTO_free(s->ext.ecpointformats, "ssl/ssl_lib.c", 1435);
30179       CRYPTO_free(s->ext.peer_ecpointformats, "ssl/ssl_lib.c", 1436);
30180       CRYPTO_free(s->ext.supportedgroups, "ssl/ssl_lib.c", 1437);
30181       CRYPTO_free(s->ext.peer_supportedgroups, "ssl/ssl_lib.c", 1438);
30182       OPENSSL_sk_pop_free(ossl_check_X509_EXTENSION_sk_type(s->ext.ocsp.exts),ossl_check_X509_EXTENSION_freefunc_type(X509_EXTENSION_free));
30183   
30184       OPENSSL_sk_pop_free(ossl_check_OCSP_RESPID_sk_type(s->ext.ocsp.ids),ossl_check_OCSP_RESPID_freefunc_type(OCSP_RESPID_free));
30185   
30186   
30187       SCT_LIST_free(s->scts);
30188       CRYPTO_free(s->ext.scts, "ssl/ssl_lib.c", 1445);
30189   
30190       CRYPTO_free(s->ext.ocsp.resp, "ssl/ssl_lib.c", 1447);
30191       CRYPTO_free(s->ext.alpn, "ssl/ssl_lib.c", 1448);
30192       CRYPTO_free(s->ext.tls13_cookie, "ssl/ssl_lib.c", 1449);
30193       if (s->clienthello != 
30194   # 1450 "ssl/ssl_lib.c" 3 4
30195                            ((void *)0)
30196   # 1450 "ssl/ssl_lib.c"
30197                                )
30198           CRYPTO_free(s->clienthello->pre_proc_exts, "ssl/ssl_lib.c", 1451);
30199       CRYPTO_free(s->clienthello, "ssl/ssl_lib.c", 1452);
30200       CRYPTO_free(s->pha_context, "ssl/ssl_lib.c", 1453);
30201       EVP_MD_CTX_free(s->pha_dgst);
30202   
30203       OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(s->ca_names),ossl_check_X509_NAME_freefunc_type(X509_NAME_free));
30204       OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(s->client_ca_names),ossl_check_X509_NAME_freefunc_type(X509_NAME_free));
30205   
30206       CRYPTO_free(s->client_cert_type, "ssl/ssl_lib.c", 1459);
30207       CRYPTO_free(s->server_cert_type, "ssl/ssl_lib.c", 1460);
30208   
30209       OSSL_STACK_OF_X509_free(s->verified_chain);
30210   
30211       if (ssl->method != 
30212   # 1464 "ssl/ssl_lib.c" 3 4
30213                         ((void *)0)
30214   # 1464 "ssl/ssl_lib.c"
30215                             )
30216           ssl->method->ssl_deinit(ssl);
30217   
30218       ASYNC_WAIT_CTX_free(s->waitctx);
30219   
30220   
30221       CRYPTO_free(s->ext.npn, "ssl/ssl_lib.c", 1470);
30222   
30223   
30224   
30225       OPENSSL_sk_free(ossl_check_SRTP_PROTECTION_PROFILE_sk_type(s->srtp_profiles));
30226   # 1483 "ssl/ssl_lib.c"
30227       BIO_free_all(s->wbio);
30228       s->wbio = 
30229   # 1484 "ssl/ssl_lib.c" 3 4
30230                ((void *)0)
30231   # 1484 "ssl/ssl_lib.c"
30232                    ;
30233       BIO_free_all(s->rbio);
30234       s->rbio = 
30235   # 1486 "ssl/ssl_lib.c" 3 4
30236                ((void *)0)
30237   # 1486 "ssl/ssl_lib.c"
30238                    ;
30239       CRYPTO_free(s->s3.tmp.valid_flags, "ssl/ssl_lib.c", 1487);
30240   }
30241   
30242   void SSL_set0_rbio(SSL *s, BIO *rbio)
30243   {
30244       SSL_CONNECTION *sc = ((s) == 
30245   # 1492 "ssl/ssl_lib.c" 3 4
30246                           ((void *)0) 
30247   # 1492 "ssl/ssl_lib.c"
30248                           ? 
30249   # 1492 "ssl/ssl_lib.c" 3 4
30250                           ((void *)0) 
30251   # 1492 "ssl/ssl_lib.c"
30252                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
30253   # 1492 "ssl/ssl_lib.c" 3 4
30254                           ((void *)0)
30255   # 1492 "ssl/ssl_lib.c"
30256                           )));
30257   
30258   
30259       if (((s) != 
30260   # 1495 "ssl/ssl_lib.c" 3 4
30261          ((void *)0) 
30262   # 1495 "ssl/ssl_lib.c"
30263          && ((s)->type == 1 || (s)->type == 2))) {
30264           ossl_quic_conn_set0_net_rbio(s, rbio);
30265           return;
30266       }
30267   
30268   
30269       if (sc == 
30270   # 1501 "ssl/ssl_lib.c" 3 4
30271                ((void *)0)
30272   # 1501 "ssl/ssl_lib.c"
30273                    )
30274           return;
30275   
30276       BIO_free_all(sc->rbio);
30277       sc->rbio = rbio;
30278       sc->rlayer.rrlmethod->set1_bio(sc->rlayer.rrl, sc->rbio);
30279   }
30280   
30281   void SSL_set0_wbio(SSL *s, BIO *wbio)
30282   {
30283       SSL_CONNECTION *sc = ((s) == 
30284   # 1511 "ssl/ssl_lib.c" 3 4
30285                           ((void *)0) 
30286   # 1511 "ssl/ssl_lib.c"
30287                           ? 
30288   # 1511 "ssl/ssl_lib.c" 3 4
30289                           ((void *)0) 
30290   # 1511 "ssl/ssl_lib.c"
30291                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
30292   # 1511 "ssl/ssl_lib.c" 3 4
30293                           ((void *)0)
30294   # 1511 "ssl/ssl_lib.c"
30295                           )));
30296   
30297   
30298       if (((s) != 
30299   # 1514 "ssl/ssl_lib.c" 3 4
30300          ((void *)0) 
30301   # 1514 "ssl/ssl_lib.c"
30302          && ((s)->type == 1 || (s)->type == 2))) {
30303           ossl_quic_conn_set0_net_wbio(s, wbio);
30304           return;
30305       }
30306   
30307   
30308       if (sc == 
30309   # 1520 "ssl/ssl_lib.c" 3 4
30310                ((void *)0)
30311   # 1520 "ssl/ssl_lib.c"
30312                    )
30313           return;
30314   
30315   
30316   
30317   
30318       if (sc->bbio != 
30319   # 1526 "ssl/ssl_lib.c" 3 4
30320                      ((void *)0)
30321   # 1526 "ssl/ssl_lib.c"
30322                          )
30323           sc->wbio = BIO_pop(sc->wbio);
30324   
30325       BIO_free_all(sc->wbio);
30326       sc->wbio = wbio;
30327   
30328   
30329       if (sc->bbio != 
30330   # 1533 "ssl/ssl_lib.c" 3 4
30331                      ((void *)0)
30332   # 1533 "ssl/ssl_lib.c"
30333                          )
30334           sc->wbio = BIO_push(sc->bbio, sc->wbio);
30335   
30336       sc->rlayer.wrlmethod->set1_bio(sc->rlayer.wrl, sc->wbio);
30337   }
30338   
30339   void SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio)
30340   {
30341   
30342   
30343   
30344   
30345   
30346   
30347       if (rbio == SSL_get_rbio(s) && wbio == SSL_get_wbio(s))
30348           return;
30349   
30350   
30351   
30352   
30353   
30354       if (rbio != 
30355   # 1554 "ssl/ssl_lib.c" 3 4
30356                  ((void *)0) 
30357   # 1554 "ssl/ssl_lib.c"
30358                       && rbio == wbio)
30359           BIO_up_ref(rbio);
30360   
30361   
30362   
30363   
30364       if (rbio == SSL_get_rbio(s)) {
30365           SSL_set0_wbio(s, wbio);
30366           return;
30367       }
30368   
30369   
30370   
30371   
30372   
30373       if (wbio == SSL_get_wbio(s) && SSL_get_rbio(s) != SSL_get_wbio(s)) {
30374           SSL_set0_rbio(s, rbio);
30375           return;
30376       }
30377   
30378   
30379       SSL_set0_rbio(s, rbio);
30380       SSL_set0_wbio(s, wbio);
30381   }
30382   
30383   BIO *SSL_get_rbio(const SSL *s)
30384   {
30385       const SSL_CONNECTION *sc = ((s) == 
30386   # 1581 "ssl/ssl_lib.c" 3 4
30387                                 ((void *)0) 
30388   # 1581 "ssl/ssl_lib.c"
30389                                 ? 
30390   # 1581 "ssl/ssl_lib.c" 3 4
30391                                 ((void *)0) 
30392   # 1581 "ssl/ssl_lib.c"
30393                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
30394   # 1581 "ssl/ssl_lib.c" 3 4
30395                                 ((void *)0)
30396   # 1581 "ssl/ssl_lib.c"
30397                                 )));
30398   
30399   
30400       if (((s) != 
30401   # 1584 "ssl/ssl_lib.c" 3 4
30402          ((void *)0) 
30403   # 1584 "ssl/ssl_lib.c"
30404          && ((s)->type == 1 || (s)->type == 2)))
30405           return ossl_quic_conn_get_net_rbio(s);
30406   
30407   
30408       if (sc == 
30409   # 1588 "ssl/ssl_lib.c" 3 4
30410                ((void *)0)
30411   # 1588 "ssl/ssl_lib.c"
30412                    )
30413           return 
30414   # 1589 "ssl/ssl_lib.c" 3 4
30415                 ((void *)0)
30416   # 1589 "ssl/ssl_lib.c"
30417                     ;
30418   
30419       return sc->rbio;
30420   }
30421   
30422   BIO *SSL_get_wbio(const SSL *s)
30423   {
30424       const SSL_CONNECTION *sc = ((s) == 
30425   # 1596 "ssl/ssl_lib.c" 3 4
30426                                 ((void *)0) 
30427   # 1596 "ssl/ssl_lib.c"
30428                                 ? 
30429   # 1596 "ssl/ssl_lib.c" 3 4
30430                                 ((void *)0) 
30431   # 1596 "ssl/ssl_lib.c"
30432                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
30433   # 1596 "ssl/ssl_lib.c" 3 4
30434                                 ((void *)0)
30435   # 1596 "ssl/ssl_lib.c"
30436                                 )));
30437   
30438   
30439       if (((s) != 
30440   # 1599 "ssl/ssl_lib.c" 3 4
30441          ((void *)0) 
30442   # 1599 "ssl/ssl_lib.c"
30443          && ((s)->type == 1 || (s)->type == 2)))
30444           return ossl_quic_conn_get_net_wbio(s);
30445   
30446   
30447       if (sc == 
30448   # 1603 "ssl/ssl_lib.c" 3 4
30449                ((void *)0)
30450   # 1603 "ssl/ssl_lib.c"
30451                    )
30452           return 
30453   # 1604 "ssl/ssl_lib.c" 3 4
30454                 ((void *)0)
30455   # 1604 "ssl/ssl_lib.c"
30456                     ;
30457   
30458       if (sc->bbio != 
30459   # 1606 "ssl/ssl_lib.c" 3 4
30460                      ((void *)0)
30461   # 1606 "ssl/ssl_lib.c"
30462                          ) {
30463   
30464   
30465   
30466   
30467           return BIO_next(sc->bbio);
30468       }
30469       return sc->wbio;
30470   }
30471   
30472   int SSL_get_fd(const SSL *s)
30473   {
30474       return SSL_get_rfd(s);
30475   }
30476   
30477   int SSL_get_rfd(const SSL *s)
30478   {
30479       int ret = -1;
30480       BIO *b, *r;
30481   
30482       b = SSL_get_rbio(s);
30483       r = BIO_find_type(b, 0x0100);
30484       if (r != 
30485   # 1628 "ssl/ssl_lib.c" 3 4
30486               ((void *)0)
30487   # 1628 "ssl/ssl_lib.c"
30488                   )
30489           BIO_ctrl(r,105,0,(char *)(&ret));
30490       return ret;
30491   }
30492   
30493   int SSL_get_wfd(const SSL *s)
30494   {
30495       int ret = -1;
30496       BIO *b, *r;
30497   
30498       b = SSL_get_wbio(s);
30499       r = BIO_find_type(b, 0x0100);
30500       if (r != 
30501   # 1640 "ssl/ssl_lib.c" 3 4
30502               ((void *)0)
30503   # 1640 "ssl/ssl_lib.c"
30504                   )
30505           BIO_ctrl(r,105,0,(char *)(&ret));
30506       return ret;
30507   }
30508   
30509   
30510   static const BIO_METHOD *fd_method(SSL *s)
30511   {
30512   
30513       if (((s) != 
30514   # 1649 "ssl/ssl_lib.c" 3 4
30515          ((void *)0) 
30516   # 1649 "ssl/ssl_lib.c"
30517          && ((s)->type == 1 || (s)->type == 2)))
30518           return BIO_s_datagram();
30519   
30520   
30521       return BIO_s_socket();
30522   }
30523   
30524   int SSL_set_fd(SSL *s, int fd)
30525   {
30526       int ret = 0;
30527       BIO *bio = 
30528   # 1659 "ssl/ssl_lib.c" 3 4
30529                 ((void *)0)
30530   # 1659 "ssl/ssl_lib.c"
30531                     ;
30532   
30533       if (s->type == 2) {
30534           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1662,__func__), ERR_set_error)((20),(356),
30535   # 1662 "ssl/ssl_lib.c" 3 4
30536          ((void *)0)
30537   # 1662 "ssl/ssl_lib.c"
30538          );
30539           goto err;
30540       }
30541   
30542       bio = BIO_new(fd_method(s));
30543   
30544       if (bio == 
30545   # 1668 "ssl/ssl_lib.c" 3 4
30546                 ((void *)0)
30547   # 1668 "ssl/ssl_lib.c"
30548                     ) {
30549           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1669,__func__), ERR_set_error)((20),((7 | (0x2 << 18L))),
30550   # 1669 "ssl/ssl_lib.c" 3 4
30551          ((void *)0)
30552   # 1669 "ssl/ssl_lib.c"
30553          );
30554           goto err;
30555       }
30556       BIO_int_ctrl(bio,104,0x00,fd);
30557       SSL_set_bio(s, bio, bio);
30558   # 1683 "ssl/ssl_lib.c"
30559       ret = 1;
30560    err:
30561       return ret;
30562   }
30563   
30564   int SSL_set_wfd(SSL *s, int fd)
30565   {
30566       BIO *rbio = SSL_get_rbio(s);
30567       int desired_type = ((s) != 
30568   # 1691 "ssl/ssl_lib.c" 3 4
30569                         ((void *)0) 
30570   # 1691 "ssl/ssl_lib.c"
30571                         && ((s)->type == 1 || (s)->type == 2)) ? (21|0x0400|0x0100) : ( 5|0x0400|0x0100);
30572   
30573       if (s->type == 2) {
30574           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1694,__func__), ERR_set_error)((20),(356),
30575   # 1694 "ssl/ssl_lib.c" 3 4
30576          ((void *)0)
30577   # 1694 "ssl/ssl_lib.c"
30578          );
30579           return 0;
30580       }
30581   
30582       if (rbio == 
30583   # 1698 "ssl/ssl_lib.c" 3 4
30584                  ((void *)0) 
30585   # 1698 "ssl/ssl_lib.c"
30586                       || BIO_method_type(rbio) != desired_type
30587           || (int)BIO_ctrl(rbio,105,0,(char *)(
30588   # 1699 "ssl/ssl_lib.c" 3 4
30589                  ((void *)0)
30590   # 1699 "ssl/ssl_lib.c"
30591                  )) != fd) {
30592           BIO *bio = BIO_new(fd_method(s));
30593   
30594           if (bio == 
30595   # 1702 "ssl/ssl_lib.c" 3 4
30596                     ((void *)0)
30597   # 1702 "ssl/ssl_lib.c"
30598                         ) {
30599               (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1703,__func__), ERR_set_error)((20),((7 | (0x2 << 18L))),
30600   # 1703 "ssl/ssl_lib.c" 3 4
30601              ((void *)0)
30602   # 1703 "ssl/ssl_lib.c"
30603              );
30604               return 0;
30605           }
30606           BIO_int_ctrl(bio,104,0x00,fd);
30607           SSL_set0_wbio(s, bio);
30608   # 1717 "ssl/ssl_lib.c"
30609       } else {
30610           BIO_up_ref(rbio);
30611           SSL_set0_wbio(s, rbio);
30612       }
30613       return 1;
30614   }
30615   
30616   int SSL_set_rfd(SSL *s, int fd)
30617   {
30618       BIO *wbio = SSL_get_wbio(s);
30619       int desired_type = ((s) != 
30620   # 1727 "ssl/ssl_lib.c" 3 4
30621                         ((void *)0) 
30622   # 1727 "ssl/ssl_lib.c"
30623                         && ((s)->type == 1 || (s)->type == 2)) ? (21|0x0400|0x0100) : ( 5|0x0400|0x0100);
30624   
30625       if (s->type == 2) {
30626           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1730,__func__), ERR_set_error)((20),(356),
30627   # 1730 "ssl/ssl_lib.c" 3 4
30628          ((void *)0)
30629   # 1730 "ssl/ssl_lib.c"
30630          );
30631           return 0;
30632       }
30633   
30634       if (wbio == 
30635   # 1734 "ssl/ssl_lib.c" 3 4
30636                  ((void *)0) 
30637   # 1734 "ssl/ssl_lib.c"
30638                       || BIO_method_type(wbio) != desired_type
30639           || ((int)BIO_ctrl(wbio,105,0,(char *)(
30640   # 1735 "ssl/ssl_lib.c" 3 4
30641                   ((void *)0)
30642   # 1735 "ssl/ssl_lib.c"
30643                   )) != fd)) {
30644           BIO *bio = BIO_new(fd_method(s));
30645   
30646           if (bio == 
30647   # 1738 "ssl/ssl_lib.c" 3 4
30648                     ((void *)0)
30649   # 1738 "ssl/ssl_lib.c"
30650                         ) {
30651               (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",1739,__func__), ERR_set_error)((20),((7 | (0x2 << 18L))),
30652   # 1739 "ssl/ssl_lib.c" 3 4
30653              ((void *)0)
30654   # 1739 "ssl/ssl_lib.c"
30655              );
30656               return 0;
30657           }
30658           BIO_int_ctrl(bio,104,0x00,fd);
30659           SSL_set0_rbio(s, bio);
30660       } else {
30661           BIO_up_ref(wbio);
30662           SSL_set0_rbio(s, wbio);
30663       }
30664   
30665       return 1;
30666   }
30667   
30668   
30669   
30670   size_t SSL_get_finished(const SSL *s, void *buf, size_t count)
30671   {
30672       size_t ret = 0;
30673       const SSL_CONNECTION *sc = ((s) == 
30674   # 1757 "ssl/ssl_lib.c" 3 4
30675                                 ((void *)0) 
30676   # 1757 "ssl/ssl_lib.c"
30677                                 ? 
30678   # 1757 "ssl/ssl_lib.c" 3 4
30679                                 ((void *)0) 
30680   # 1757 "ssl/ssl_lib.c"
30681                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
30682   # 1757 "ssl/ssl_lib.c" 3 4
30683                                 ((void *)0)
30684   # 1757 "ssl/ssl_lib.c"
30685                                 )));
30686   
30687       if (sc == 
30688   # 1759 "ssl/ssl_lib.c" 3 4
30689                ((void *)0)
30690   # 1759 "ssl/ssl_lib.c"
30691                    )
30692           return 0;
30693   
30694       ret = sc->s3.tmp.finish_md_len;
30695       if (count > ret)
30696           count = ret;
30697       memcpy(buf, sc->s3.tmp.finish_md, count);
30698       return ret;
30699   }
30700   
30701   
30702   size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count)
30703   {
30704       size_t ret = 0;
30705       const SSL_CONNECTION *sc = ((s) == 
30706   # 1773 "ssl/ssl_lib.c" 3 4
30707                                 ((void *)0) 
30708   # 1773 "ssl/ssl_lib.c"
30709                                 ? 
30710   # 1773 "ssl/ssl_lib.c" 3 4
30711                                 ((void *)0) 
30712   # 1773 "ssl/ssl_lib.c"
30713                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
30714   # 1773 "ssl/ssl_lib.c" 3 4
30715                                 ((void *)0)
30716   # 1773 "ssl/ssl_lib.c"
30717                                 )));
30718   
30719       if (sc == 
30720   # 1775 "ssl/ssl_lib.c" 3 4
30721                ((void *)0)
30722   # 1775 "ssl/ssl_lib.c"
30723                    )
30724           return 0;
30725   
30726       ret = sc->s3.tmp.peer_finish_md_len;
30727       if (count > ret)
30728           count = ret;
30729       memcpy(buf, sc->s3.tmp.peer_finish_md, count);
30730       return ret;
30731   }
30732   
30733   int SSL_get_verify_mode(const SSL *s)
30734   {
30735       const SSL_CONNECTION *sc = ((s) == 
30736   # 1787 "ssl/ssl_lib.c" 3 4
30737                                 ((void *)0) 
30738   # 1787 "ssl/ssl_lib.c"
30739                                 ? 
30740   # 1787 "ssl/ssl_lib.c" 3 4
30741                                 ((void *)0) 
30742   # 1787 "ssl/ssl_lib.c"
30743                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
30744   # 1787 "ssl/ssl_lib.c" 3 4
30745                                 ((void *)0)
30746   # 1787 "ssl/ssl_lib.c"
30747                                 )));
30748   
30749       if (sc == 
30750   # 1789 "ssl/ssl_lib.c" 3 4
30751                ((void *)0)
30752   # 1789 "ssl/ssl_lib.c"
30753                    )
30754           return 0;
30755   
30756       return sc->verify_mode;
30757   }
30758   
30759   int SSL_get_verify_depth(const SSL *s)
30760   {
30761       const SSL_CONNECTION *sc = ((s) == 
30762   # 1797 "ssl/ssl_lib.c" 3 4
30763                                 ((void *)0) 
30764   # 1797 "ssl/ssl_lib.c"
30765                                 ? 
30766   # 1797 "ssl/ssl_lib.c" 3 4
30767                                 ((void *)0) 
30768   # 1797 "ssl/ssl_lib.c"
30769                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
30770   # 1797 "ssl/ssl_lib.c" 3 4
30771                                 ((void *)0)
30772   # 1797 "ssl/ssl_lib.c"
30773                                 )));
30774   
30775       if (sc == 
30776   # 1799 "ssl/ssl_lib.c" 3 4
30777                ((void *)0)
30778   # 1799 "ssl/ssl_lib.c"
30779                    )
30780           return 0;
30781   
30782       return X509_VERIFY_PARAM_get_depth(sc->param);
30783   }
30784   
30785   int (*SSL_get_verify_callback(const SSL *s)) (int, X509_STORE_CTX *) {
30786       const SSL_CONNECTION *sc = ((s) == 
30787   # 1806 "ssl/ssl_lib.c" 3 4
30788                                 ((void *)0) 
30789   # 1806 "ssl/ssl_lib.c"
30790                                 ? 
30791   # 1806 "ssl/ssl_lib.c" 3 4
30792                                 ((void *)0) 
30793   # 1806 "ssl/ssl_lib.c"
30794                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
30795   # 1806 "ssl/ssl_lib.c" 3 4
30796                                 ((void *)0)
30797   # 1806 "ssl/ssl_lib.c"
30798                                 )));
30799   
30800       if (sc == 
30801   # 1808 "ssl/ssl_lib.c" 3 4
30802                ((void *)0)
30803   # 1808 "ssl/ssl_lib.c"
30804                    )
30805           return 
30806   # 1809 "ssl/ssl_lib.c" 3 4
30807                 ((void *)0)
30808   # 1809 "ssl/ssl_lib.c"
30809                     ;
30810   
30811       return sc->verify_callback;
30812   }
30813   
30814   int SSL_CTX_get_verify_mode(const SSL_CTX *ctx)
30815   {
30816       return ctx->verify_mode;
30817   }
30818   
30819   int SSL_CTX_get_verify_depth(const SSL_CTX *ctx)
30820   {
30821       return X509_VERIFY_PARAM_get_depth(ctx->param);
30822   }
30823   
30824   int (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx)) (int, X509_STORE_CTX *) {
30825       return ctx->default_verify_callback;
30826   }
30827   
30828   void SSL_set_verify(SSL *s, int mode,
30829                       int (*callback) (int ok, X509_STORE_CTX *ctx))
30830   {
30831       SSL_CONNECTION *sc = ((s) == 
30832   # 1831 "ssl/ssl_lib.c" 3 4
30833                           ((void *)0) 
30834   # 1831 "ssl/ssl_lib.c"
30835                           ? 
30836   # 1831 "ssl/ssl_lib.c" 3 4
30837                           ((void *)0) 
30838   # 1831 "ssl/ssl_lib.c"
30839                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
30840   # 1831 "ssl/ssl_lib.c" 3 4
30841                           ((void *)0)
30842   # 1831 "ssl/ssl_lib.c"
30843                           )));
30844   
30845       if (sc == 
30846   # 1833 "ssl/ssl_lib.c" 3 4
30847                ((void *)0)
30848   # 1833 "ssl/ssl_lib.c"
30849                    )
30850           return;
30851   
30852       sc->verify_mode = mode;
30853       if (callback != 
30854   # 1837 "ssl/ssl_lib.c" 3 4
30855                      ((void *)0)
30856   # 1837 "ssl/ssl_lib.c"
30857                          )
30858           sc->verify_callback = callback;
30859   }
30860   
30861   void SSL_set_verify_depth(SSL *s, int depth)
30862   {
30863       SSL_CONNECTION *sc = ((s) == 
30864   # 1843 "ssl/ssl_lib.c" 3 4
30865                           ((void *)0) 
30866   # 1843 "ssl/ssl_lib.c"
30867                           ? 
30868   # 1843 "ssl/ssl_lib.c" 3 4
30869                           ((void *)0) 
30870   # 1843 "ssl/ssl_lib.c"
30871                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
30872   # 1843 "ssl/ssl_lib.c" 3 4
30873                           ((void *)0)
30874   # 1843 "ssl/ssl_lib.c"
30875                           )));
30876   
30877       if (sc == 
30878   # 1845 "ssl/ssl_lib.c" 3 4
30879                ((void *)0)
30880   # 1845 "ssl/ssl_lib.c"
30881                    )
30882           return;
30883   
30884       X509_VERIFY_PARAM_set_depth(sc->param, depth);
30885   }
30886   
30887   void SSL_set_read_ahead(SSL *s, int yes)
30888   {
30889       SSL_CONNECTION *sc = ((s) == 
30890   # 1853 "ssl/ssl_lib.c" 3 4
30891                           ((void *)0) 
30892   # 1853 "ssl/ssl_lib.c"
30893                           ? 
30894   # 1853 "ssl/ssl_lib.c" 3 4
30895                           ((void *)0) 
30896   # 1853 "ssl/ssl_lib.c"
30897                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : 
30898   # 1853 "ssl/ssl_lib.c" 3 4
30899                           ((void *)0)
30900   # 1853 "ssl/ssl_lib.c"
30901                           ));
30902       OSSL_PARAM options[2], *opts = options;
30903   
30904       if (sc == 
30905   # 1856 "ssl/ssl_lib.c" 3 4
30906                ((void *)0)
30907   # 1856 "ssl/ssl_lib.c"
30908                    )
30909           return;
30910   
30911       ((&sc->rlayer)->read_ahead = (yes));
30912   
30913       *opts++ = OSSL_PARAM_construct_int("read_ahead",
30914                                          &sc->rlayer.read_ahead);
30915       *opts = OSSL_PARAM_construct_end();
30916   
30917   
30918       sc->rlayer.rrlmethod->set_options(sc->rlayer.rrl, options);
30919   }
30920   
30921   int SSL_get_read_ahead(const SSL *s)
30922   {
30923       const SSL_CONNECTION *sc = ((s) == 
30924   # 1871 "ssl/ssl_lib.c" 3 4
30925                                 ((void *)0) 
30926   # 1871 "ssl/ssl_lib.c"
30927                                 ? 
30928   # 1871 "ssl/ssl_lib.c" 3 4
30929                                 ((void *)0) 
30930   # 1871 "ssl/ssl_lib.c"
30931                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : 
30932   # 1871 "ssl/ssl_lib.c" 3 4
30933                                 ((void *)0)
30934   # 1871 "ssl/ssl_lib.c"
30935                                 ));
30936   
30937       if (sc == 
30938   # 1873 "ssl/ssl_lib.c" 3 4
30939                ((void *)0)
30940   # 1873 "ssl/ssl_lib.c"
30941                    )
30942           return 0;
30943   
30944       return ((&sc->rlayer)->read_ahead);
30945   }
30946   
30947   int SSL_pending(const SSL *s)
30948   {
30949       size_t pending = s->method->ssl_pending(s);
30950   # 1893 "ssl/ssl_lib.c"
30951       return pending < 0x7fffffff ? (int)pending : 0x7fffffff;
30952   }
30953   
30954   int SSL_has_pending(const SSL *s)
30955   {
30956   # 1906 "ssl/ssl_lib.c"
30957       const SSL_CONNECTION *sc;
30958   
30959   
30960       if (((s) != 
30961   # 1909 "ssl/ssl_lib.c" 3 4
30962          ((void *)0) 
30963   # 1909 "ssl/ssl_lib.c"
30964          && ((s)->type == 1 || (s)->type == 2)))
30965           return ossl_quic_has_pending(s);
30966   
30967   
30968       sc = ((s) == 
30969   # 1913 "ssl/ssl_lib.c" 3 4
30970           ((void *)0) 
30971   # 1913 "ssl/ssl_lib.c"
30972           ? 
30973   # 1913 "ssl/ssl_lib.c" 3 4
30974           ((void *)0) 
30975   # 1913 "ssl/ssl_lib.c"
30976           : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
30977   # 1913 "ssl/ssl_lib.c" 3 4
30978           ((void *)0)
30979   # 1913 "ssl/ssl_lib.c"
30980           )));
30981   
30982   
30983       if (((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8)) {
30984           TLS_RECORD *rdata;
30985           pitem *item, *iter;
30986   
30987           iter = pqueue_iterator(sc->rlayer.d->buffered_app_data);
30988           while ((item = pqueue_next(&iter)) != 
30989   # 1921 "ssl/ssl_lib.c" 3 4
30990                                                ((void *)0)
30991   # 1921 "ssl/ssl_lib.c"
30992                                                    ) {
30993               rdata = item->data;
30994               if (rdata->length > 0)
30995                   return 1;
30996           }
30997       }
30998   
30999       if (RECORD_LAYER_processed_read_pending(&sc->rlayer))
31000           return 1;
31001   
31002       return RECORD_LAYER_read_pending(&sc->rlayer);
31003   }
31004   
31005   X509 *SSL_get1_peer_certificate(const SSL *s)
31006   {
31007       X509 *r = SSL_get0_peer_certificate(s);
31008   
31009       if (r != 
31010   # 1938 "ssl/ssl_lib.c" 3 4
31011               ((void *)0)
31012   # 1938 "ssl/ssl_lib.c"
31013                   )
31014           X509_up_ref(r);
31015   
31016       return r;
31017   }
31018   
31019   X509 *SSL_get0_peer_certificate(const SSL *s)
31020   {
31021       const SSL_CONNECTION *sc = ((s) == 
31022   # 1946 "ssl/ssl_lib.c" 3 4
31023                                 ((void *)0) 
31024   # 1946 "ssl/ssl_lib.c"
31025                                 ? 
31026   # 1946 "ssl/ssl_lib.c" 3 4
31027                                 ((void *)0) 
31028   # 1946 "ssl/ssl_lib.c"
31029                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
31030   # 1946 "ssl/ssl_lib.c" 3 4
31031                                 ((void *)0)
31032   # 1946 "ssl/ssl_lib.c"
31033                                 )));
31034   
31035       if (sc == 
31036   # 1948 "ssl/ssl_lib.c" 3 4
31037                ((void *)0)
31038   # 1948 "ssl/ssl_lib.c"
31039                    )
31040           return 
31041   # 1949 "ssl/ssl_lib.c" 3 4
31042                 ((void *)0)
31043   # 1949 "ssl/ssl_lib.c"
31044                     ;
31045   
31046       if (sc->session == 
31047   # 1951 "ssl/ssl_lib.c" 3 4
31048                         ((void *)0)
31049   # 1951 "ssl/ssl_lib.c"
31050                             )
31051           return 
31052   # 1952 "ssl/ssl_lib.c" 3 4
31053                 ((void *)0)
31054   # 1952 "ssl/ssl_lib.c"
31055                     ;
31056       else
31057           return sc->session->peer;
31058   }
31059   
31060   struct stack_st_X509 *SSL_get_peer_cert_chain(const SSL *s)
31061   {
31062       struct stack_st_X509 *r;
31063       const SSL_CONNECTION *sc = ((s) == 
31064   # 1960 "ssl/ssl_lib.c" 3 4
31065                                 ((void *)0) 
31066   # 1960 "ssl/ssl_lib.c"
31067                                 ? 
31068   # 1960 "ssl/ssl_lib.c" 3 4
31069                                 ((void *)0) 
31070   # 1960 "ssl/ssl_lib.c"
31071                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
31072   # 1960 "ssl/ssl_lib.c" 3 4
31073                                 ((void *)0)
31074   # 1960 "ssl/ssl_lib.c"
31075                                 )));
31076   
31077       if (sc == 
31078   # 1962 "ssl/ssl_lib.c" 3 4
31079                ((void *)0)
31080   # 1962 "ssl/ssl_lib.c"
31081                    )
31082           return 
31083   # 1963 "ssl/ssl_lib.c" 3 4
31084                 ((void *)0)
31085   # 1963 "ssl/ssl_lib.c"
31086                     ;
31087   
31088       if (sc->session == 
31089   # 1965 "ssl/ssl_lib.c" 3 4
31090                         ((void *)0)
31091   # 1965 "ssl/ssl_lib.c"
31092                             )
31093           r = 
31094   # 1966 "ssl/ssl_lib.c" 3 4
31095              ((void *)0)
31096   # 1966 "ssl/ssl_lib.c"
31097                  ;
31098       else
31099           r = sc->session->peer_chain;
31100   
31101   
31102   
31103   
31104   
31105   
31106       return r;
31107   }
31108   
31109   
31110   
31111   
31112   
31113   int SSL_copy_session_id(SSL *t, const SSL *f)
31114   {
31115       int i;
31116   
31117       SSL_CONNECTION *tsc = ((t) == 
31118   # 1986 "ssl/ssl_lib.c" 3 4
31119                            ((void *)0) 
31120   # 1986 "ssl/ssl_lib.c"
31121                            ? 
31122   # 1986 "ssl/ssl_lib.c" 3 4
31123                            ((void *)0) 
31124   # 1986 "ssl/ssl_lib.c"
31125                            : ((t)->type == 0 ? ( SSL_CONNECTION *)(t) : 
31126   # 1986 "ssl/ssl_lib.c" 3 4
31127                            ((void *)0)
31128   # 1986 "ssl/ssl_lib.c"
31129                            ));
31130       const SSL_CONNECTION *fsc = ((f) == 
31131   # 1987 "ssl/ssl_lib.c" 3 4
31132                                  ((void *)0) 
31133   # 1987 "ssl/ssl_lib.c"
31134                                  ? 
31135   # 1987 "ssl/ssl_lib.c" 3 4
31136                                  ((void *)0) 
31137   # 1987 "ssl/ssl_lib.c"
31138                                  : ((f)->type == 0 ? (const SSL_CONNECTION *)(f) : 
31139   # 1987 "ssl/ssl_lib.c" 3 4
31140                                  ((void *)0)
31141   # 1987 "ssl/ssl_lib.c"
31142                                  ));
31143   
31144       if (tsc == 
31145   # 1989 "ssl/ssl_lib.c" 3 4
31146                 ((void *)0) 
31147   # 1989 "ssl/ssl_lib.c"
31148                      || fsc == 
31149   # 1989 "ssl/ssl_lib.c" 3 4
31150                                ((void *)0)
31151   # 1989 "ssl/ssl_lib.c"
31152                                    )
31153           return 0;
31154   
31155   
31156       if (!SSL_set_session(t, SSL_get_session(f))) {
31157           return 0;
31158       }
31159   
31160   
31161   
31162   
31163       if (t->method != f->method) {
31164           t->method->ssl_deinit(t);
31165           t->method = f->method;
31166           if (t->method->ssl_init(t) == 0)
31167               return 0;
31168       }
31169   
31170       CRYPTO_UP_REF(&fsc->cert->references, &i);
31171       ssl_cert_free(tsc->cert);
31172       tsc->cert = fsc->cert;
31173       if (!SSL_set_session_id_context(t, fsc->sid_ctx, (int)fsc->sid_ctx_length)) {
31174           return 0;
31175       }
31176   
31177       return 1;
31178   }
31179   
31180   
31181   int SSL_CTX_check_private_key(const SSL_CTX *ctx)
31182   {
31183       if ((ctx == 
31184   # 2020 "ssl/ssl_lib.c" 3 4
31185                  ((void *)0)
31186   # 2020 "ssl/ssl_lib.c"
31187                      ) || (ctx->cert->key->x509 == 
31188   # 2020 "ssl/ssl_lib.c" 3 4
31189                                                    ((void *)0)
31190   # 2020 "ssl/ssl_lib.c"
31191                                                        )) {
31192           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2021,__func__), ERR_set_error)((20),(177),
31193   # 2021 "ssl/ssl_lib.c" 3 4
31194          ((void *)0)
31195   # 2021 "ssl/ssl_lib.c"
31196          );
31197           return 0;
31198       }
31199       if (ctx->cert->key->privatekey == 
31200   # 2024 "ssl/ssl_lib.c" 3 4
31201                                        ((void *)0)
31202   # 2024 "ssl/ssl_lib.c"
31203                                            ) {
31204           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2025,__func__), ERR_set_error)((20),(190),
31205   # 2025 "ssl/ssl_lib.c" 3 4
31206          ((void *)0)
31207   # 2025 "ssl/ssl_lib.c"
31208          );
31209           return 0;
31210       }
31211       return X509_check_private_key
31212               (ctx->cert->key->x509, ctx->cert->key->privatekey);
31213   }
31214   
31215   
31216   int SSL_check_private_key(const SSL *ssl)
31217   {
31218       const SSL_CONNECTION *sc;
31219   
31220       if ((sc = ((ssl) == 
31221   # 2037 "ssl/ssl_lib.c" 3 4
31222                ((void *)0) 
31223   # 2037 "ssl/ssl_lib.c"
31224                ? 
31225   # 2037 "ssl/ssl_lib.c" 3 4
31226                ((void *)0) 
31227   # 2037 "ssl/ssl_lib.c"
31228                : ((ssl)->type == 0 ? (const SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(ssl))->tls : 
31229   # 2037 "ssl/ssl_lib.c" 3 4
31230                ((void *)0)
31231   # 2037 "ssl/ssl_lib.c"
31232                )))) == 
31233   # 2037 "ssl/ssl_lib.c" 3 4
31234                                                       ((void *)0)
31235   # 2037 "ssl/ssl_lib.c"
31236                                                           ) {
31237           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2038,__func__), ERR_set_error)((20),((258|((0x1 << 18L)|(0x2 << 18L)))),
31238   # 2038 "ssl/ssl_lib.c" 3 4
31239          ((void *)0)
31240   # 2038 "ssl/ssl_lib.c"
31241          );
31242           return 0;
31243       }
31244       if (sc->cert->key->x509 == 
31245   # 2041 "ssl/ssl_lib.c" 3 4
31246                                 ((void *)0)
31247   # 2041 "ssl/ssl_lib.c"
31248                                     ) {
31249           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2042,__func__), ERR_set_error)((20),(177),
31250   # 2042 "ssl/ssl_lib.c" 3 4
31251          ((void *)0)
31252   # 2042 "ssl/ssl_lib.c"
31253          );
31254           return 0;
31255       }
31256       if (sc->cert->key->privatekey == 
31257   # 2045 "ssl/ssl_lib.c" 3 4
31258                                       ((void *)0)
31259   # 2045 "ssl/ssl_lib.c"
31260                                           ) {
31261           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2046,__func__), ERR_set_error)((20),(190),
31262   # 2046 "ssl/ssl_lib.c" 3 4
31263          ((void *)0)
31264   # 2046 "ssl/ssl_lib.c"
31265          );
31266           return 0;
31267       }
31268       return X509_check_private_key(sc->cert->key->x509,
31269                                      sc->cert->key->privatekey);
31270   }
31271   
31272   int SSL_waiting_for_async(SSL *s)
31273   {
31274       SSL_CONNECTION *sc = ((s) == 
31275   # 2055 "ssl/ssl_lib.c" 3 4
31276                           ((void *)0) 
31277   # 2055 "ssl/ssl_lib.c"
31278                           ? 
31279   # 2055 "ssl/ssl_lib.c" 3 4
31280                           ((void *)0) 
31281   # 2055 "ssl/ssl_lib.c"
31282                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
31283   # 2055 "ssl/ssl_lib.c" 3 4
31284                           ((void *)0)
31285   # 2055 "ssl/ssl_lib.c"
31286                           )));
31287   
31288       if (sc == 
31289   # 2057 "ssl/ssl_lib.c" 3 4
31290                ((void *)0)
31291   # 2057 "ssl/ssl_lib.c"
31292                    )
31293           return 0;
31294   
31295       if (sc->job)
31296           return 1;
31297   
31298       return 0;
31299   }
31300   
31301   int SSL_get_all_async_fds(SSL *s, int *fds, size_t *numfds)
31302   {
31303       ASYNC_WAIT_CTX *ctx;
31304       SSL_CONNECTION *sc = ((s) == 
31305   # 2069 "ssl/ssl_lib.c" 3 4
31306                           ((void *)0) 
31307   # 2069 "ssl/ssl_lib.c"
31308                           ? 
31309   # 2069 "ssl/ssl_lib.c" 3 4
31310                           ((void *)0) 
31311   # 2069 "ssl/ssl_lib.c"
31312                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
31313   # 2069 "ssl/ssl_lib.c" 3 4
31314                           ((void *)0)
31315   # 2069 "ssl/ssl_lib.c"
31316                           )));
31317   
31318       if (sc == 
31319   # 2071 "ssl/ssl_lib.c" 3 4
31320                ((void *)0)
31321   # 2071 "ssl/ssl_lib.c"
31322                    )
31323           return 0;
31324   
31325       if ((ctx = sc->waitctx) == 
31326   # 2074 "ssl/ssl_lib.c" 3 4
31327                                 ((void *)0)
31328   # 2074 "ssl/ssl_lib.c"
31329                                     )
31330           return 0;
31331       return ASYNC_WAIT_CTX_get_all_fds(ctx, fds, numfds);
31332   }
31333   
31334   int SSL_get_changed_async_fds(SSL *s, int *addfd, size_t *numaddfds,
31335                                 int *delfd, size_t *numdelfds)
31336   {
31337       ASYNC_WAIT_CTX *ctx;
31338       SSL_CONNECTION *sc = ((s) == 
31339   # 2083 "ssl/ssl_lib.c" 3 4
31340                           ((void *)0) 
31341   # 2083 "ssl/ssl_lib.c"
31342                           ? 
31343   # 2083 "ssl/ssl_lib.c" 3 4
31344                           ((void *)0) 
31345   # 2083 "ssl/ssl_lib.c"
31346                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
31347   # 2083 "ssl/ssl_lib.c" 3 4
31348                           ((void *)0)
31349   # 2083 "ssl/ssl_lib.c"
31350                           )));
31351   
31352       if (sc == 
31353   # 2085 "ssl/ssl_lib.c" 3 4
31354                ((void *)0)
31355   # 2085 "ssl/ssl_lib.c"
31356                    )
31357           return 0;
31358   
31359       if ((ctx = sc->waitctx) == 
31360   # 2088 "ssl/ssl_lib.c" 3 4
31361                                 ((void *)0)
31362   # 2088 "ssl/ssl_lib.c"
31363                                     )
31364           return 0;
31365       return ASYNC_WAIT_CTX_get_changed_fds(ctx, addfd, numaddfds, delfd,
31366                                             numdelfds);
31367   }
31368   
31369   int SSL_CTX_set_async_callback(SSL_CTX *ctx, SSL_async_callback_fn callback)
31370   {
31371       ctx->async_cb = callback;
31372       return 1;
31373   }
31374   
31375   int SSL_CTX_set_async_callback_arg(SSL_CTX *ctx, void *arg)
31376   {
31377       ctx->async_cb_arg = arg;
31378       return 1;
31379   }
31380   
31381   int SSL_set_async_callback(SSL *s, SSL_async_callback_fn callback)
31382   {
31383       SSL_CONNECTION *sc = ((s) == 
31384   # 2108 "ssl/ssl_lib.c" 3 4
31385                           ((void *)0) 
31386   # 2108 "ssl/ssl_lib.c"
31387                           ? 
31388   # 2108 "ssl/ssl_lib.c" 3 4
31389                           ((void *)0) 
31390   # 2108 "ssl/ssl_lib.c"
31391                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
31392   # 2108 "ssl/ssl_lib.c" 3 4
31393                           ((void *)0)
31394   # 2108 "ssl/ssl_lib.c"
31395                           )));
31396   
31397       if (sc == 
31398   # 2110 "ssl/ssl_lib.c" 3 4
31399                ((void *)0)
31400   # 2110 "ssl/ssl_lib.c"
31401                    )
31402           return 0;
31403   
31404       sc->async_cb = callback;
31405       return 1;
31406   }
31407   
31408   int SSL_set_async_callback_arg(SSL *s, void *arg)
31409   {
31410       SSL_CONNECTION *sc = ((s) == 
31411   # 2119 "ssl/ssl_lib.c" 3 4
31412                           ((void *)0) 
31413   # 2119 "ssl/ssl_lib.c"
31414                           ? 
31415   # 2119 "ssl/ssl_lib.c" 3 4
31416                           ((void *)0) 
31417   # 2119 "ssl/ssl_lib.c"
31418                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
31419   # 2119 "ssl/ssl_lib.c" 3 4
31420                           ((void *)0)
31421   # 2119 "ssl/ssl_lib.c"
31422                           )));
31423   
31424       if (sc == 
31425   # 2121 "ssl/ssl_lib.c" 3 4
31426                ((void *)0)
31427   # 2121 "ssl/ssl_lib.c"
31428                    )
31429           return 0;
31430   
31431       sc->async_cb_arg = arg;
31432       return 1;
31433   }
31434   
31435   int SSL_get_async_status(SSL *s, int *status)
31436   {
31437       ASYNC_WAIT_CTX *ctx;
31438       SSL_CONNECTION *sc = ((s) == 
31439   # 2131 "ssl/ssl_lib.c" 3 4
31440                           ((void *)0) 
31441   # 2131 "ssl/ssl_lib.c"
31442                           ? 
31443   # 2131 "ssl/ssl_lib.c" 3 4
31444                           ((void *)0) 
31445   # 2131 "ssl/ssl_lib.c"
31446                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
31447   # 2131 "ssl/ssl_lib.c" 3 4
31448                           ((void *)0)
31449   # 2131 "ssl/ssl_lib.c"
31450                           )));
31451   
31452       if (sc == 
31453   # 2133 "ssl/ssl_lib.c" 3 4
31454                ((void *)0)
31455   # 2133 "ssl/ssl_lib.c"
31456                    )
31457           return 0;
31458   
31459       if ((ctx = sc->waitctx) == 
31460   # 2136 "ssl/ssl_lib.c" 3 4
31461                                 ((void *)0)
31462   # 2136 "ssl/ssl_lib.c"
31463                                     )
31464           return 0;
31465       *status = ASYNC_WAIT_CTX_get_status(ctx);
31466       return 1;
31467   }
31468   
31469   int SSL_accept(SSL *s)
31470   {
31471       SSL_CONNECTION *sc = ((s) == 
31472   # 2144 "ssl/ssl_lib.c" 3 4
31473                           ((void *)0) 
31474   # 2144 "ssl/ssl_lib.c"
31475                           ? 
31476   # 2144 "ssl/ssl_lib.c" 3 4
31477                           ((void *)0) 
31478   # 2144 "ssl/ssl_lib.c"
31479                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
31480   # 2144 "ssl/ssl_lib.c" 3 4
31481                           ((void *)0)
31482   # 2144 "ssl/ssl_lib.c"
31483                           )));
31484   
31485   
31486       if (((s) != 
31487   # 2147 "ssl/ssl_lib.c" 3 4
31488          ((void *)0) 
31489   # 2147 "ssl/ssl_lib.c"
31490          && ((s)->type == 1 || (s)->type == 2)))
31491           return s->method->ssl_accept(s);
31492   
31493   
31494       if (sc == 
31495   # 2151 "ssl/ssl_lib.c" 3 4
31496                ((void *)0)
31497   # 2151 "ssl/ssl_lib.c"
31498                    )
31499           return 0;
31500   
31501       if (sc->handshake_func == 
31502   # 2154 "ssl/ssl_lib.c" 3 4
31503                                ((void *)0)
31504   # 2154 "ssl/ssl_lib.c"
31505                                    ) {
31506   
31507           SSL_set_accept_state(s);
31508       }
31509   
31510       return SSL_do_handshake(s);
31511   }
31512   
31513   int SSL_connect(SSL *s)
31514   {
31515       SSL_CONNECTION *sc = ((s) == 
31516   # 2164 "ssl/ssl_lib.c" 3 4
31517                           ((void *)0) 
31518   # 2164 "ssl/ssl_lib.c"
31519                           ? 
31520   # 2164 "ssl/ssl_lib.c" 3 4
31521                           ((void *)0) 
31522   # 2164 "ssl/ssl_lib.c"
31523                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
31524   # 2164 "ssl/ssl_lib.c" 3 4
31525                           ((void *)0)
31526   # 2164 "ssl/ssl_lib.c"
31527                           )));
31528   
31529   
31530       if (((s) != 
31531   # 2167 "ssl/ssl_lib.c" 3 4
31532          ((void *)0) 
31533   # 2167 "ssl/ssl_lib.c"
31534          && ((s)->type == 1 || (s)->type == 2)))
31535           return s->method->ssl_connect(s);
31536   
31537   
31538       if (sc == 
31539   # 2171 "ssl/ssl_lib.c" 3 4
31540                ((void *)0)
31541   # 2171 "ssl/ssl_lib.c"
31542                    )
31543           return 0;
31544   
31545       if (sc->handshake_func == 
31546   # 2174 "ssl/ssl_lib.c" 3 4
31547                                ((void *)0)
31548   # 2174 "ssl/ssl_lib.c"
31549                                    ) {
31550   
31551           SSL_set_connect_state(s);
31552       }
31553   
31554       return SSL_do_handshake(s);
31555   }
31556   
31557   long SSL_get_default_timeout(const SSL *s)
31558   {
31559       return (long int)(ossl_time2ticks(s->method->get_timeout()) / ((uint64_t)1000000000));
31560   }
31561   
31562   static int ssl_async_wait_ctx_cb(void *arg)
31563   {
31564       SSL *s = (SSL *)arg;
31565       SSL_CONNECTION *sc = ((s) == 
31566   # 2190 "ssl/ssl_lib.c" 3 4
31567                           ((void *)0) 
31568   # 2190 "ssl/ssl_lib.c"
31569                           ? 
31570   # 2190 "ssl/ssl_lib.c" 3 4
31571                           ((void *)0) 
31572   # 2190 "ssl/ssl_lib.c"
31573                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
31574   # 2190 "ssl/ssl_lib.c" 3 4
31575                           ((void *)0)
31576   # 2190 "ssl/ssl_lib.c"
31577                           )));
31578   
31579       if (sc == 
31580   # 2192 "ssl/ssl_lib.c" 3 4
31581                ((void *)0)
31582   # 2192 "ssl/ssl_lib.c"
31583                    )
31584           return 0;
31585   
31586       return sc->async_cb(s, sc->async_cb_arg);
31587   }
31588   
31589   static int ssl_start_async_job(SSL *s, struct ssl_async_args *args,
31590                                  int (*func) (void *))
31591   {
31592       int ret;
31593       SSL_CONNECTION *sc = ((s) == 
31594   # 2202 "ssl/ssl_lib.c" 3 4
31595                           ((void *)0) 
31596   # 2202 "ssl/ssl_lib.c"
31597                           ? 
31598   # 2202 "ssl/ssl_lib.c" 3 4
31599                           ((void *)0) 
31600   # 2202 "ssl/ssl_lib.c"
31601                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
31602   # 2202 "ssl/ssl_lib.c" 3 4
31603                           ((void *)0)
31604   # 2202 "ssl/ssl_lib.c"
31605                           )));
31606   
31607       if (sc == 
31608   # 2204 "ssl/ssl_lib.c" 3 4
31609                ((void *)0)
31610   # 2204 "ssl/ssl_lib.c"
31611                    )
31612           return 0;
31613   
31614       if (sc->waitctx == 
31615   # 2207 "ssl/ssl_lib.c" 3 4
31616                         ((void *)0)
31617   # 2207 "ssl/ssl_lib.c"
31618                             ) {
31619           sc->waitctx = ASYNC_WAIT_CTX_new();
31620           if (sc->waitctx == 
31621   # 2209 "ssl/ssl_lib.c" 3 4
31622                             ((void *)0)
31623   # 2209 "ssl/ssl_lib.c"
31624                                 )
31625               return -1;
31626           if (sc->async_cb != 
31627   # 2211 "ssl/ssl_lib.c" 3 4
31628                              ((void *)0)
31629               
31630   # 2212 "ssl/ssl_lib.c"
31631              && !ASYNC_WAIT_CTX_set_callback
31632                    (sc->waitctx, ssl_async_wait_ctx_cb, s))
31633               return -1;
31634       }
31635   
31636       sc->rwstate = 1;
31637       switch (ASYNC_start_job(&sc->job, sc->waitctx, &ret, func, args,
31638                               sizeof(struct ssl_async_args))) {
31639       case 0:
31640           sc->rwstate = 1;
31641           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2222,__func__), ERR_set_error)((20),(405),
31642   # 2222 "ssl/ssl_lib.c" 3 4
31643          ((void *)0)
31644   # 2222 "ssl/ssl_lib.c"
31645          );
31646           return -1;
31647       case 2:
31648           sc->rwstate = 5;
31649           return -1;
31650       case 1:
31651           sc->rwstate = 6;
31652           return -1;
31653       case 3:
31654           sc->job = 
31655   # 2231 "ssl/ssl_lib.c" 3 4
31656                    ((void *)0)
31657   # 2231 "ssl/ssl_lib.c"
31658                        ;
31659           return ret;
31660       default:
31661           sc->rwstate = 1;
31662           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2235,__func__), ERR_set_error)((20),((259|((0x1 << 18L)|(0x2 << 18L)))),
31663   # 2235 "ssl/ssl_lib.c" 3 4
31664          ((void *)0)
31665   # 2235 "ssl/ssl_lib.c"
31666          );
31667   
31668           return -1;
31669       }
31670   }
31671   
31672   static int ssl_io_intern(void *vargs)
31673   {
31674       struct ssl_async_args *args;
31675       SSL *s;
31676       void *buf;
31677       size_t num;
31678       SSL_CONNECTION *sc;
31679   
31680       args = (struct ssl_async_args *)vargs;
31681       s = args->s;
31682       buf = args->buf;
31683       num = args->num;
31684       if ((sc = ((s) == 
31685   # 2253 "ssl/ssl_lib.c" 3 4
31686                ((void *)0) 
31687   # 2253 "ssl/ssl_lib.c"
31688                ? 
31689   # 2253 "ssl/ssl_lib.c" 3 4
31690                ((void *)0) 
31691   # 2253 "ssl/ssl_lib.c"
31692                : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
31693   # 2253 "ssl/ssl_lib.c" 3 4
31694                ((void *)0)
31695   # 2253 "ssl/ssl_lib.c"
31696                )))) == 
31697   # 2253 "ssl/ssl_lib.c" 3 4
31698                                               ((void *)0)
31699   # 2253 "ssl/ssl_lib.c"
31700                                                   )
31701           return -1;
31702   
31703       switch (args->type) {
31704       case READFUNC:
31705           return args->f.func_read(s, buf, num, &sc->asyncrw);
31706       case WRITEFUNC:
31707           return args->f.func_write(s, buf, num, &sc->asyncrw);
31708       case OTHERFUNC:
31709           return args->f.func_other(s);
31710       }
31711       return -1;
31712   }
31713   
31714   int ssl_read_internal(SSL *s, void *buf, size_t num, size_t *readbytes)
31715   {
31716       SSL_CONNECTION *sc = ((s) == 
31717   # 2269 "ssl/ssl_lib.c" 3 4
31718                           ((void *)0) 
31719   # 2269 "ssl/ssl_lib.c"
31720                           ? 
31721   # 2269 "ssl/ssl_lib.c" 3 4
31722                           ((void *)0) 
31723   # 2269 "ssl/ssl_lib.c"
31724                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
31725   # 2269 "ssl/ssl_lib.c" 3 4
31726                           ((void *)0)
31727   # 2269 "ssl/ssl_lib.c"
31728                           )));
31729   
31730   
31731       if (((s) != 
31732   # 2272 "ssl/ssl_lib.c" 3 4
31733          ((void *)0) 
31734   # 2272 "ssl/ssl_lib.c"
31735          && ((s)->type == 1 || (s)->type == 2)))
31736           return s->method->ssl_read(s, buf, num, readbytes);
31737   
31738   
31739       if (sc == 
31740   # 2276 "ssl/ssl_lib.c" 3 4
31741                ((void *)0)
31742   # 2276 "ssl/ssl_lib.c"
31743                    )
31744           return -1;
31745   
31746       if (sc->handshake_func == 
31747   # 2279 "ssl/ssl_lib.c" 3 4
31748                                ((void *)0)
31749   # 2279 "ssl/ssl_lib.c"
31750                                    ) {
31751           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2280,__func__), ERR_set_error)((20),(276),
31752   # 2280 "ssl/ssl_lib.c" 3 4
31753          ((void *)0)
31754   # 2280 "ssl/ssl_lib.c"
31755          );
31756           return -1;
31757       }
31758   
31759       if (sc->shutdown & 2) {
31760           sc->rwstate = 1;
31761           return 0;
31762       }
31763   
31764       if (sc->early_data_state == SSL_EARLY_DATA_CONNECT_RETRY
31765                   || sc->early_data_state == SSL_EARLY_DATA_ACCEPT_RETRY) {
31766           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2291,__func__), ERR_set_error)((20),((257|((0x1 << 18L)|(0x2 << 18L)))),
31767   # 2291 "ssl/ssl_lib.c" 3 4
31768          ((void *)0)
31769   # 2291 "ssl/ssl_lib.c"
31770          );
31771           return 0;
31772       }
31773   
31774   
31775   
31776   
31777       ossl_statem_check_finish_init(sc, 0);
31778   
31779       if ((sc->mode & 0x00000100U) && ASYNC_get_current_job() == 
31780   # 2300 "ssl/ssl_lib.c" 3 4
31781                                                                    ((void *)0)
31782   # 2300 "ssl/ssl_lib.c"
31783                                                                        ) {
31784           struct ssl_async_args args;
31785           int ret;
31786   
31787           args.s = s;
31788           args.buf = buf;
31789           args.num = num;
31790           args.type = READFUNC;
31791           args.f.func_read = s->method->ssl_read;
31792   
31793           ret = ssl_start_async_job(s, &args, ssl_io_intern);
31794           *readbytes = sc->asyncrw;
31795           return ret;
31796       } else {
31797           return s->method->ssl_read(s, buf, num, readbytes);
31798       }
31799   }
31800   
31801   int SSL_read(SSL *s, void *buf, int num)
31802   {
31803       int ret;
31804       size_t readbytes;
31805   
31806       if (num < 0) {
31807           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2324,__func__), ERR_set_error)((20),(271),
31808   # 2324 "ssl/ssl_lib.c" 3 4
31809          ((void *)0)
31810   # 2324 "ssl/ssl_lib.c"
31811          );
31812           return -1;
31813       }
31814   
31815       ret = ssl_read_internal(s, buf, (size_t)num, &readbytes);
31816   
31817   
31818   
31819   
31820   
31821       if (ret > 0)
31822           ret = (int)readbytes;
31823   
31824       return ret;
31825   }
31826   
31827   int SSL_read_ex(SSL *s, void *buf, size_t num, size_t *readbytes)
31828   {
31829       int ret = ssl_read_internal(s, buf, num, readbytes);
31830   
31831       if (ret < 0)
31832           ret = 0;
31833       return ret;
31834   }
31835   
31836   int SSL_read_early_data(SSL *s, void *buf, size_t num, size_t *readbytes)
31837   {
31838       int ret;
31839       SSL_CONNECTION *sc = ((s) == 
31840   # 2352 "ssl/ssl_lib.c" 3 4
31841                           ((void *)0) 
31842   # 2352 "ssl/ssl_lib.c"
31843                           ? 
31844   # 2352 "ssl/ssl_lib.c" 3 4
31845                           ((void *)0) 
31846   # 2352 "ssl/ssl_lib.c"
31847                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : 
31848   # 2352 "ssl/ssl_lib.c" 3 4
31849                           ((void *)0)
31850   # 2352 "ssl/ssl_lib.c"
31851                           ));
31852   
31853   
31854       if (sc == 
31855   # 2355 "ssl/ssl_lib.c" 3 4
31856                ((void *)0) 
31857   # 2355 "ssl/ssl_lib.c"
31858                     || !sc->server) {
31859           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2356,__func__), ERR_set_error)((20),((257|((0x1 << 18L)|(0x2 << 18L)))),
31860   # 2356 "ssl/ssl_lib.c" 3 4
31861          ((void *)0)
31862   # 2356 "ssl/ssl_lib.c"
31863          );
31864           return 0;
31865       }
31866   
31867       switch (sc->early_data_state) {
31868       case SSL_EARLY_DATA_NONE:
31869           if (!SSL_in_before(s)) {
31870               (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2363,__func__), ERR_set_error)((20),((257|((0x1 << 18L)|(0x2 << 18L)))),
31871   # 2363 "ssl/ssl_lib.c" 3 4
31872              ((void *)0)
31873   # 2363 "ssl/ssl_lib.c"
31874              );
31875               return 0;
31876           }
31877   
31878   
31879       case SSL_EARLY_DATA_ACCEPT_RETRY:
31880           sc->early_data_state = SSL_EARLY_DATA_ACCEPTING;
31881           ret = SSL_accept(s);
31882           if (ret <= 0) {
31883   
31884               sc->early_data_state = SSL_EARLY_DATA_ACCEPT_RETRY;
31885               return 0;
31886           }
31887   
31888   
31889       case SSL_EARLY_DATA_READ_RETRY:
31890           if (sc->ext.early_data == 2) {
31891               sc->early_data_state = SSL_EARLY_DATA_READING;
31892               ret = SSL_read_ex(s, buf, num, readbytes);
31893   
31894   
31895   
31896   
31897   
31898               if (ret > 0 || (ret <= 0 && sc->early_data_state
31899                                           != SSL_EARLY_DATA_FINISHED_READING)) {
31900                   sc->early_data_state = SSL_EARLY_DATA_READ_RETRY;
31901                   return ret > 0 ? 1
31902                                  : 0;
31903               }
31904           } else {
31905               sc->early_data_state = SSL_EARLY_DATA_FINISHED_READING;
31906           }
31907           *readbytes = 0;
31908           return 2;
31909   
31910       default:
31911           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2400,__func__), ERR_set_error)((20),((257|((0x1 << 18L)|(0x2 << 18L)))),
31912   # 2400 "ssl/ssl_lib.c" 3 4
31913          ((void *)0)
31914   # 2400 "ssl/ssl_lib.c"
31915          );
31916           return 0;
31917       }
31918   }
31919   
31920   int SSL_get_early_data_status(const SSL *s)
31921   {
31922       const SSL_CONNECTION *sc = ((s) == 
31923   # 2407 "ssl/ssl_lib.c" 3 4
31924                                 ((void *)0) 
31925   # 2407 "ssl/ssl_lib.c"
31926                                 ? 
31927   # 2407 "ssl/ssl_lib.c" 3 4
31928                                 ((void *)0) 
31929   # 2407 "ssl/ssl_lib.c"
31930                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : 
31931   # 2407 "ssl/ssl_lib.c" 3 4
31932                                 ((void *)0)
31933   # 2407 "ssl/ssl_lib.c"
31934                                 ));
31935   
31936   
31937       if (sc == 
31938   # 2410 "ssl/ssl_lib.c" 3 4
31939                ((void *)0)
31940   # 2410 "ssl/ssl_lib.c"
31941                    )
31942           return 0;
31943   
31944       return sc->ext.early_data;
31945   }
31946   
31947   static int ssl_peek_internal(SSL *s, void *buf, size_t num, size_t *readbytes)
31948   {
31949       SSL_CONNECTION *sc = ((s) == 
31950   # 2418 "ssl/ssl_lib.c" 3 4
31951                           ((void *)0) 
31952   # 2418 "ssl/ssl_lib.c"
31953                           ? 
31954   # 2418 "ssl/ssl_lib.c" 3 4
31955                           ((void *)0) 
31956   # 2418 "ssl/ssl_lib.c"
31957                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
31958   # 2418 "ssl/ssl_lib.c" 3 4
31959                           ((void *)0)
31960   # 2418 "ssl/ssl_lib.c"
31961                           )));
31962   
31963   
31964       if (((s) != 
31965   # 2421 "ssl/ssl_lib.c" 3 4
31966          ((void *)0) 
31967   # 2421 "ssl/ssl_lib.c"
31968          && ((s)->type == 1 || (s)->type == 2)))
31969           return s->method->ssl_peek(s, buf, num, readbytes);
31970   
31971   
31972       if (sc == 
31973   # 2425 "ssl/ssl_lib.c" 3 4
31974                ((void *)0)
31975   # 2425 "ssl/ssl_lib.c"
31976                    )
31977           return 0;
31978   
31979       if (sc->handshake_func == 
31980   # 2428 "ssl/ssl_lib.c" 3 4
31981                                ((void *)0)
31982   # 2428 "ssl/ssl_lib.c"
31983                                    ) {
31984           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2429,__func__), ERR_set_error)((20),(276),
31985   # 2429 "ssl/ssl_lib.c" 3 4
31986          ((void *)0)
31987   # 2429 "ssl/ssl_lib.c"
31988          );
31989           return -1;
31990       }
31991   
31992       if (sc->shutdown & 2) {
31993           return 0;
31994       }
31995       if ((sc->mode & 0x00000100U) && ASYNC_get_current_job() == 
31996   # 2436 "ssl/ssl_lib.c" 3 4
31997                                                                    ((void *)0)
31998   # 2436 "ssl/ssl_lib.c"
31999                                                                        ) {
32000           struct ssl_async_args args;
32001           int ret;
32002   
32003           args.s = s;
32004           args.buf = buf;
32005           args.num = num;
32006           args.type = READFUNC;
32007           args.f.func_read = s->method->ssl_peek;
32008   
32009           ret = ssl_start_async_job(s, &args, ssl_io_intern);
32010           *readbytes = sc->asyncrw;
32011           return ret;
32012       } else {
32013           return s->method->ssl_peek(s, buf, num, readbytes);
32014       }
32015   }
32016   
32017   int SSL_peek(SSL *s, void *buf, int num)
32018   {
32019       int ret;
32020       size_t readbytes;
32021   
32022       if (num < 0) {
32023           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2460,__func__), ERR_set_error)((20),(271),
32024   # 2460 "ssl/ssl_lib.c" 3 4
32025          ((void *)0)
32026   # 2460 "ssl/ssl_lib.c"
32027          );
32028           return -1;
32029       }
32030   
32031       ret = ssl_peek_internal(s, buf, (size_t)num, &readbytes);
32032   
32033   
32034   
32035   
32036   
32037       if (ret > 0)
32038           ret = (int)readbytes;
32039   
32040       return ret;
32041   }
32042   
32043   
32044   int SSL_peek_ex(SSL *s, void *buf, size_t num, size_t *readbytes)
32045   {
32046       int ret = ssl_peek_internal(s, buf, num, readbytes);
32047   
32048       if (ret < 0)
32049           ret = 0;
32050       return ret;
32051   }
32052   
32053   int ssl_write_internal(SSL *s, const void *buf, size_t num,
32054                          uint64_t flags, size_t *written)
32055   {
32056       SSL_CONNECTION *sc = ((s) == 
32057   # 2489 "ssl/ssl_lib.c" 3 4
32058                           ((void *)0) 
32059   # 2489 "ssl/ssl_lib.c"
32060                           ? 
32061   # 2489 "ssl/ssl_lib.c" 3 4
32062                           ((void *)0) 
32063   # 2489 "ssl/ssl_lib.c"
32064                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
32065   # 2489 "ssl/ssl_lib.c" 3 4
32066                           ((void *)0)
32067   # 2489 "ssl/ssl_lib.c"
32068                           )));
32069   
32070   
32071       if (((s) != 
32072   # 2492 "ssl/ssl_lib.c" 3 4
32073          ((void *)0) 
32074   # 2492 "ssl/ssl_lib.c"
32075          && ((s)->type == 1 || (s)->type == 2)))
32076           return ossl_quic_write_flags(s, buf, num, flags, written);
32077   
32078   
32079       if (sc == 
32080   # 2496 "ssl/ssl_lib.c" 3 4
32081                ((void *)0)
32082   # 2496 "ssl/ssl_lib.c"
32083                    )
32084           return 0;
32085   
32086       if (sc->handshake_func == 
32087   # 2499 "ssl/ssl_lib.c" 3 4
32088                                ((void *)0)
32089   # 2499 "ssl/ssl_lib.c"
32090                                    ) {
32091           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2500,__func__), ERR_set_error)((20),(276),
32092   # 2500 "ssl/ssl_lib.c" 3 4
32093          ((void *)0)
32094   # 2500 "ssl/ssl_lib.c"
32095          );
32096           return -1;
32097       }
32098   
32099       if (sc->shutdown & 1) {
32100           sc->rwstate = 1;
32101           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2506,__func__), ERR_set_error)((20),(207),
32102   # 2506 "ssl/ssl_lib.c" 3 4
32103          ((void *)0)
32104   # 2506 "ssl/ssl_lib.c"
32105          );
32106           return -1;
32107       }
32108   
32109       if (flags != 0) {
32110           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2511,__func__), ERR_set_error)((20),(412),
32111   # 2511 "ssl/ssl_lib.c" 3 4
32112          ((void *)0)
32113   # 2511 "ssl/ssl_lib.c"
32114          );
32115           return -1;
32116       }
32117   
32118       if (sc->early_data_state == SSL_EARLY_DATA_CONNECT_RETRY
32119                   || sc->early_data_state == SSL_EARLY_DATA_ACCEPT_RETRY
32120                   || sc->early_data_state == SSL_EARLY_DATA_READ_RETRY) {
32121           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2518,__func__), ERR_set_error)((20),((257|((0x1 << 18L)|(0x2 << 18L)))),
32122   # 2518 "ssl/ssl_lib.c" 3 4
32123          ((void *)0)
32124   # 2518 "ssl/ssl_lib.c"
32125          );
32126           return 0;
32127       }
32128   
32129       ossl_statem_check_finish_init(sc, 1);
32130   
32131       if ((sc->mode & 0x00000100U) && ASYNC_get_current_job() == 
32132   # 2524 "ssl/ssl_lib.c" 3 4
32133                                                                    ((void *)0)
32134   # 2524 "ssl/ssl_lib.c"
32135                                                                        ) {
32136           int ret;
32137           struct ssl_async_args args;
32138   
32139           args.s = s;
32140           args.buf = (void *)buf;
32141           args.num = num;
32142           args.type = WRITEFUNC;
32143           args.f.func_write = s->method->ssl_write;
32144   
32145           ret = ssl_start_async_job(s, &args, ssl_io_intern);
32146           *written = sc->asyncrw;
32147           return ret;
32148       } else {
32149           return s->method->ssl_write(s, buf, num, written);
32150       }
32151   }
32152   
32153   ssize_t SSL_sendfile(SSL *s, int fd, off_t offset, size_t size, int flags)
32154   {
32155       ssize_t ret;
32156       SSL_CONNECTION *sc = ((s) == 
32157   # 2545 "ssl/ssl_lib.c" 3 4
32158                           ((void *)0) 
32159   # 2545 "ssl/ssl_lib.c"
32160                           ? 
32161   # 2545 "ssl/ssl_lib.c" 3 4
32162                           ((void *)0) 
32163   # 2545 "ssl/ssl_lib.c"
32164                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : 
32165   # 2545 "ssl/ssl_lib.c" 3 4
32166                           ((void *)0)
32167   # 2545 "ssl/ssl_lib.c"
32168                           ));
32169   
32170       if (sc == 
32171   # 2547 "ssl/ssl_lib.c" 3 4
32172                ((void *)0)
32173   # 2547 "ssl/ssl_lib.c"
32174                    )
32175           return 0;
32176   
32177       if (sc->handshake_func == 
32178   # 2550 "ssl/ssl_lib.c" 3 4
32179                                ((void *)0)
32180   # 2550 "ssl/ssl_lib.c"
32181                                    ) {
32182           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2551,__func__), ERR_set_error)((20),(276),
32183   # 2551 "ssl/ssl_lib.c" 3 4
32184          ((void *)0)
32185   # 2551 "ssl/ssl_lib.c"
32186          );
32187           return -1;
32188       }
32189   
32190       if (sc->shutdown & 1) {
32191           sc->rwstate = 1;
32192           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2557,__func__), ERR_set_error)((20),(207),
32193   # 2557 "ssl/ssl_lib.c" 3 4
32194          ((void *)0)
32195   # 2557 "ssl/ssl_lib.c"
32196          );
32197           return -1;
32198       }
32199   
32200       if (!(0)) {
32201           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2562,__func__), ERR_set_error)((20),(276),
32202   # 2562 "ssl/ssl_lib.c" 3 4
32203          ((void *)0)
32204   # 2562 "ssl/ssl_lib.c"
32205          );
32206           return -1;
32207       }
32208   
32209   
32210       if (sc->s3.alert_dispatch > 0) {
32211           ret = (ssize_t)s->method->ssl_dispatch_alert(s);
32212           if (ret <= 0) {
32213   
32214               return ret;
32215           }
32216   
32217       }
32218   
32219       sc->rwstate = 2;
32220       if ((int)BIO_ctrl(sc->wbio,11,0,
32221   # 2577 "ssl/ssl_lib.c" 3 4
32222          ((void *)0)
32223   # 2577 "ssl/ssl_lib.c"
32224          ) <= 0) {
32225           if (!BIO_test_flags(sc->wbio, 0x08)) {
32226               sc->rwstate = 1;
32227           } else {
32228   
32229               
32230   # 2582 "ssl/ssl_lib.c" 3 4
32231              (*__errno_location ())
32232   # 2582 "ssl/ssl_lib.c"
32233              =(
32234   # 2582 "ssl/ssl_lib.c" 3 4
32235              11
32236   # 2582 "ssl/ssl_lib.c"
32237              );
32238   
32239           }
32240           return -1;
32241       }
32242   
32243   
32244       (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2589,__func__), ERR_set_error)(20, (259|((0x1 << 18L)|(0x2 << 18L))),
32245                      "can't call ktls_sendfile(), ktls disabled");
32246       return -1;
32247   # 2608 "ssl/ssl_lib.c"
32248   }
32249   
32250   int SSL_write(SSL *s, const void *buf, int num)
32251   {
32252       int ret;
32253       size_t written;
32254   
32255       if (num < 0) {
32256           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2616,__func__), ERR_set_error)((20),(271),
32257   # 2616 "ssl/ssl_lib.c" 3 4
32258          ((void *)0)
32259   # 2616 "ssl/ssl_lib.c"
32260          );
32261           return -1;
32262       }
32263   
32264       ret = ssl_write_internal(s, buf, (size_t)num, 0, &written);
32265   
32266   
32267   
32268   
32269   
32270       if (ret > 0)
32271           ret = (int)written;
32272   
32273       return ret;
32274   }
32275   
32276   int SSL_write_ex(SSL *s, const void *buf, size_t num, size_t *written)
32277   {
32278       return SSL_write_ex2(s, buf, num, 0, written);
32279   }
32280   
32281   int SSL_write_ex2(SSL *s, const void *buf, size_t num, uint64_t flags,
32282                     size_t *written)
32283   {
32284       int ret = ssl_write_internal(s, buf, num, flags, written);
32285   
32286       if (ret < 0)
32287           ret = 0;
32288       return ret;
32289   }
32290   
32291   int SSL_write_early_data(SSL *s, const void *buf, size_t num, size_t *written)
32292   {
32293       int ret, early_data_state;
32294       size_t writtmp;
32295       uint32_t partialwrite;
32296       SSL_CONNECTION *sc = ((s) == 
32297   # 2652 "ssl/ssl_lib.c" 3 4
32298                           ((void *)0) 
32299   # 2652 "ssl/ssl_lib.c"
32300                           ? 
32301   # 2652 "ssl/ssl_lib.c" 3 4
32302                           ((void *)0) 
32303   # 2652 "ssl/ssl_lib.c"
32304                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : 
32305   # 2652 "ssl/ssl_lib.c" 3 4
32306                           ((void *)0)
32307   # 2652 "ssl/ssl_lib.c"
32308                           ));
32309   
32310   
32311       if (sc == 
32312   # 2655 "ssl/ssl_lib.c" 3 4
32313                ((void *)0)
32314   # 2655 "ssl/ssl_lib.c"
32315                    )
32316           return 0;
32317   
32318       switch (sc->early_data_state) {
32319       case SSL_EARLY_DATA_NONE:
32320           if (sc->server
32321                   || !SSL_in_before(s)
32322                   || ((sc->session == 
32323   # 2662 "ssl/ssl_lib.c" 3 4
32324                                      ((void *)0) 
32325   # 2662 "ssl/ssl_lib.c"
32326                                           || sc->session->ext.max_early_data == 0)
32327                        && (sc->psk_use_session_cb == 
32328   # 2663 "ssl/ssl_lib.c" 3 4
32329                                                     ((void *)0)
32330   # 2663 "ssl/ssl_lib.c"
32331                                                         ))) {
32332               (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2664,__func__), ERR_set_error)((20),((257|((0x1 << 18L)|(0x2 << 18L)))),
32333   # 2664 "ssl/ssl_lib.c" 3 4
32334              ((void *)0)
32335   # 2664 "ssl/ssl_lib.c"
32336              );
32337               return 0;
32338           }
32339   
32340   
32341       case SSL_EARLY_DATA_CONNECT_RETRY:
32342           sc->early_data_state = SSL_EARLY_DATA_CONNECTING;
32343           ret = SSL_connect(s);
32344           if (ret <= 0) {
32345   
32346               sc->early_data_state = SSL_EARLY_DATA_CONNECT_RETRY;
32347               return 0;
32348           }
32349   
32350   
32351       case SSL_EARLY_DATA_WRITE_RETRY:
32352           sc->early_data_state = SSL_EARLY_DATA_WRITING;
32353   
32354   
32355   
32356   
32357   
32358           partialwrite = sc->mode & 0x00000001U;
32359           sc->mode &= ~0x00000001U;
32360           ret = SSL_write_ex(s, buf, num, &writtmp);
32361           sc->mode |= partialwrite;
32362           if (!ret) {
32363               sc->early_data_state = SSL_EARLY_DATA_WRITE_RETRY;
32364               return ret;
32365           }
32366           sc->early_data_state = SSL_EARLY_DATA_WRITE_FLUSH;
32367   
32368   
32369       case SSL_EARLY_DATA_WRITE_FLUSH:
32370   
32371           if (statem_flush(sc) != 1)
32372               return 0;
32373           *written = num;
32374           sc->early_data_state = SSL_EARLY_DATA_WRITE_RETRY;
32375           return 1;
32376   
32377       case SSL_EARLY_DATA_FINISHED_READING:
32378       case SSL_EARLY_DATA_READ_RETRY:
32379           early_data_state = sc->early_data_state;
32380   
32381           sc->early_data_state = SSL_EARLY_DATA_UNAUTH_WRITING;
32382           ret = SSL_write_ex(s, buf, num, written);
32383   
32384           if (ret)
32385               (void)(int)BIO_ctrl(sc->wbio,11,0,
32386   # 2713 "ssl/ssl_lib.c" 3 4
32387                    ((void *)0)
32388   # 2713 "ssl/ssl_lib.c"
32389                    );
32390           sc->early_data_state = early_data_state;
32391           return ret;
32392   
32393       default:
32394           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2718,__func__), ERR_set_error)((20),((257|((0x1 << 18L)|(0x2 << 18L)))),
32395   # 2718 "ssl/ssl_lib.c" 3 4
32396          ((void *)0)
32397   # 2718 "ssl/ssl_lib.c"
32398          );
32399           return 0;
32400       }
32401   }
32402   
32403   int SSL_shutdown(SSL *s)
32404   {
32405   
32406   
32407   
32408   
32409   
32410   
32411       SSL_CONNECTION *sc = ((s) == 
32412   # 2731 "ssl/ssl_lib.c" 3 4
32413                           ((void *)0) 
32414   # 2731 "ssl/ssl_lib.c"
32415                           ? 
32416   # 2731 "ssl/ssl_lib.c" 3 4
32417                           ((void *)0) 
32418   # 2731 "ssl/ssl_lib.c"
32419                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
32420   # 2731 "ssl/ssl_lib.c" 3 4
32421                           ((void *)0)
32422   # 2731 "ssl/ssl_lib.c"
32423                           )));
32424   
32425   
32426       if (((s) != 
32427   # 2734 "ssl/ssl_lib.c" 3 4
32428          ((void *)0) 
32429   # 2734 "ssl/ssl_lib.c"
32430          && ((s)->type == 1 || (s)->type == 2)))
32431           return ossl_quic_conn_shutdown(s, 0, 
32432   # 2735 "ssl/ssl_lib.c" 3 4
32433                                               ((void *)0)
32434   # 2735 "ssl/ssl_lib.c"
32435                                                   , 0);
32436   
32437   
32438       if (sc == 
32439   # 2738 "ssl/ssl_lib.c" 3 4
32440                ((void *)0)
32441   # 2738 "ssl/ssl_lib.c"
32442                    )
32443           return -1;
32444   
32445       if (sc->handshake_func == 
32446   # 2741 "ssl/ssl_lib.c" 3 4
32447                                ((void *)0)
32448   # 2741 "ssl/ssl_lib.c"
32449                                    ) {
32450           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2742,__func__), ERR_set_error)((20),(276),
32451   # 2742 "ssl/ssl_lib.c" 3 4
32452          ((void *)0)
32453   # 2742 "ssl/ssl_lib.c"
32454          );
32455           return -1;
32456       }
32457   
32458       if (!SSL_in_init(s)) {
32459           if ((sc->mode & 0x00000100U) && ASYNC_get_current_job() == 
32460   # 2747 "ssl/ssl_lib.c" 3 4
32461                                                                        ((void *)0)
32462   # 2747 "ssl/ssl_lib.c"
32463                                                                            ) {
32464               struct ssl_async_args args;
32465   
32466               memset(&args, 0, sizeof(args));
32467               args.s = s;
32468               args.type = OTHERFUNC;
32469               args.f.func_other = s->method->ssl_shutdown;
32470   
32471               return ssl_start_async_job(s, &args, ssl_io_intern);
32472           } else {
32473               return s->method->ssl_shutdown(s);
32474           }
32475       } else {
32476           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2760,__func__), ERR_set_error)((20),(407),
32477   # 2760 "ssl/ssl_lib.c" 3 4
32478          ((void *)0)
32479   # 2760 "ssl/ssl_lib.c"
32480          );
32481           return -1;
32482       }
32483   }
32484   
32485   int SSL_key_update(SSL *s, int updatetype)
32486   {
32487       SSL_CONNECTION *sc = ((s) == 
32488   # 2767 "ssl/ssl_lib.c" 3 4
32489                           ((void *)0) 
32490   # 2767 "ssl/ssl_lib.c"
32491                           ? 
32492   # 2767 "ssl/ssl_lib.c" 3 4
32493                           ((void *)0) 
32494   # 2767 "ssl/ssl_lib.c"
32495                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
32496   # 2767 "ssl/ssl_lib.c" 3 4
32497                           ((void *)0)
32498   # 2767 "ssl/ssl_lib.c"
32499                           )));
32500   
32501   
32502       if (((s) != 
32503   # 2770 "ssl/ssl_lib.c" 3 4
32504          ((void *)0) 
32505   # 2770 "ssl/ssl_lib.c"
32506          && ((s)->type == 1 || (s)->type == 2)))
32507           return ossl_quic_key_update(s, updatetype);
32508   
32509   
32510       if (sc == 
32511   # 2774 "ssl/ssl_lib.c" 3 4
32512                ((void *)0)
32513   # 2774 "ssl/ssl_lib.c"
32514                    )
32515           return 0;
32516   
32517       if (!(!((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8) && (&(sc)->ssl)->method->version >= 0x0304 && (&(sc)->ssl)->method->version != 0x10000)) {
32518           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2778,__func__), ERR_set_error)((20),(266),
32519   # 2778 "ssl/ssl_lib.c" 3 4
32520          ((void *)0)
32521   # 2778 "ssl/ssl_lib.c"
32522          );
32523           return 0;
32524       }
32525   
32526       if (updatetype != 0
32527               && updatetype != 1) {
32528           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2784,__func__), ERR_set_error)((20),(120),
32529   # 2784 "ssl/ssl_lib.c" 3 4
32530          ((void *)0)
32531   # 2784 "ssl/ssl_lib.c"
32532          );
32533           return 0;
32534       }
32535   
32536       if (!SSL_is_init_finished(s)) {
32537           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2789,__func__), ERR_set_error)((20),(121),
32538   # 2789 "ssl/ssl_lib.c" 3 4
32539          ((void *)0)
32540   # 2789 "ssl/ssl_lib.c"
32541          );
32542           return 0;
32543       }
32544   
32545       if (RECORD_LAYER_write_pending(&sc->rlayer)) {
32546           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2794,__func__), ERR_set_error)((20),(127),
32547   # 2794 "ssl/ssl_lib.c" 3 4
32548          ((void *)0)
32549   # 2794 "ssl/ssl_lib.c"
32550          );
32551           return 0;
32552       }
32553   
32554       ossl_statem_set_in_init(sc, 1);
32555       sc->key_update = updatetype;
32556       return 1;
32557   }
32558   
32559   int SSL_get_key_update_type(const SSL *s)
32560   {
32561       const SSL_CONNECTION *sc = ((s) == 
32562   # 2805 "ssl/ssl_lib.c" 3 4
32563                                 ((void *)0) 
32564   # 2805 "ssl/ssl_lib.c"
32565                                 ? 
32566   # 2805 "ssl/ssl_lib.c" 3 4
32567                                 ((void *)0) 
32568   # 2805 "ssl/ssl_lib.c"
32569                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
32570   # 2805 "ssl/ssl_lib.c" 3 4
32571                                 ((void *)0)
32572   # 2805 "ssl/ssl_lib.c"
32573                                 )));
32574   
32575   
32576       if (((s) != 
32577   # 2808 "ssl/ssl_lib.c" 3 4
32578          ((void *)0) 
32579   # 2808 "ssl/ssl_lib.c"
32580          && ((s)->type == 1 || (s)->type == 2)))
32581           return ossl_quic_get_key_update_type(s);
32582   
32583   
32584       if (sc == 
32585   # 2812 "ssl/ssl_lib.c" 3 4
32586                ((void *)0)
32587   # 2812 "ssl/ssl_lib.c"
32588                    )
32589           return 0;
32590   
32591       return sc->key_update;
32592   }
32593   
32594   
32595   
32596   
32597   
32598   static int can_renegotiate(const SSL_CONNECTION *sc)
32599   {
32600       if ((!((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8) && (&(sc)->ssl)->method->version >= 0x0304 && (&(sc)->ssl)->method->version != 0x10000)) {
32601           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2825,__func__), ERR_set_error)((20),(266),
32602   # 2825 "ssl/ssl_lib.c" 3 4
32603          ((void *)0)
32604   # 2825 "ssl/ssl_lib.c"
32605          );
32606           return 0;
32607       }
32608   
32609       if ((sc->options & ((uint64_t)1 << (uint64_t)30)) != 0) {
32610           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",2830,__func__), ERR_set_error)((20),(339),
32611   # 2830 "ssl/ssl_lib.c" 3 4
32612          ((void *)0)
32613   # 2830 "ssl/ssl_lib.c"
32614          );
32615           return 0;
32616       }
32617   
32618       return 1;
32619   }
32620   
32621   int SSL_renegotiate(SSL *s)
32622   {
32623       SSL_CONNECTION *sc = ((s) == 
32624   # 2839 "ssl/ssl_lib.c" 3 4
32625                           ((void *)0) 
32626   # 2839 "ssl/ssl_lib.c"
32627                           ? 
32628   # 2839 "ssl/ssl_lib.c" 3 4
32629                           ((void *)0) 
32630   # 2839 "ssl/ssl_lib.c"
32631                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : 
32632   # 2839 "ssl/ssl_lib.c" 3 4
32633                           ((void *)0)
32634   # 2839 "ssl/ssl_lib.c"
32635                           ));
32636   
32637       if (sc == 
32638   # 2841 "ssl/ssl_lib.c" 3 4
32639                ((void *)0)
32640   # 2841 "ssl/ssl_lib.c"
32641                    )
32642           return 0;
32643   
32644       if (!can_renegotiate(sc))
32645           return 0;
32646   
32647       sc->renegotiate = 1;
32648       sc->new_session = 1;
32649       return s->method->ssl_renegotiate(s);
32650   }
32651   
32652   int SSL_renegotiate_abbreviated(SSL *s)
32653   {
32654       SSL_CONNECTION *sc = ((s) == 
32655   # 2854 "ssl/ssl_lib.c" 3 4
32656                           ((void *)0) 
32657   # 2854 "ssl/ssl_lib.c"
32658                           ? 
32659   # 2854 "ssl/ssl_lib.c" 3 4
32660                           ((void *)0) 
32661   # 2854 "ssl/ssl_lib.c"
32662                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : 
32663   # 2854 "ssl/ssl_lib.c" 3 4
32664                           ((void *)0)
32665   # 2854 "ssl/ssl_lib.c"
32666                           ));
32667   
32668       if (sc == 
32669   # 2856 "ssl/ssl_lib.c" 3 4
32670                ((void *)0)
32671   # 2856 "ssl/ssl_lib.c"
32672                    )
32673           return 0;
32674   
32675       if (!can_renegotiate(sc))
32676           return 0;
32677   
32678       sc->renegotiate = 1;
32679       sc->new_session = 0;
32680       return s->method->ssl_renegotiate(s);
32681   }
32682   
32683   int SSL_renegotiate_pending(const SSL *s)
32684   {
32685       SSL_CONNECTION *sc = ((s) == 
32686   # 2869 "ssl/ssl_lib.c" 3 4
32687                           ((void *)0) 
32688   # 2869 "ssl/ssl_lib.c"
32689                           ? 
32690   # 2869 "ssl/ssl_lib.c" 3 4
32691                           ((void *)0) 
32692   # 2869 "ssl/ssl_lib.c"
32693                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : 
32694   # 2869 "ssl/ssl_lib.c" 3 4
32695                           ((void *)0)
32696   # 2869 "ssl/ssl_lib.c"
32697                           ));
32698   
32699       if (sc == 
32700   # 2871 "ssl/ssl_lib.c" 3 4
32701                ((void *)0)
32702   # 2871 "ssl/ssl_lib.c"
32703                    )
32704           return 0;
32705   
32706   
32707   
32708   
32709   
32710       return (sc->renegotiate != 0);
32711   }
32712   
32713   int SSL_new_session_ticket(SSL *s)
32714   {
32715       SSL_CONNECTION *sc = ((s) == 
32716   # 2883 "ssl/ssl_lib.c" 3 4
32717                           ((void *)0) 
32718   # 2883 "ssl/ssl_lib.c"
32719                           ? 
32720   # 2883 "ssl/ssl_lib.c" 3 4
32721                           ((void *)0) 
32722   # 2883 "ssl/ssl_lib.c"
32723                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
32724   # 2883 "ssl/ssl_lib.c" 3 4
32725                           ((void *)0)
32726   # 2883 "ssl/ssl_lib.c"
32727                           )));
32728   
32729       if (sc == 
32730   # 2885 "ssl/ssl_lib.c" 3 4
32731                ((void *)0)
32732   # 2885 "ssl/ssl_lib.c"
32733                    )
32734           return 0;
32735   
32736   
32737       if ((SSL_in_init(s) && sc->ext.extra_tickets_expected == 0)
32738               || ((sc)->s3.tmp.finish_md_len == 0 || (sc)->s3.tmp.peer_finish_md_len == 0) || !sc->server
32739               || !(!((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8) && (&(sc)->ssl)->method->version >= 0x0304 && (&(sc)->ssl)->method->version != 0x10000))
32740           return 0;
32741       sc->ext.extra_tickets_expected++;
32742       if (!RECORD_LAYER_write_pending(&sc->rlayer) && !SSL_in_init(s))
32743           ossl_statem_set_in_init(sc, 1);
32744       return 1;
32745   }
32746   
32747   long SSL_ctrl(SSL *s, int cmd, long larg, void *parg)
32748   {
32749       return ossl_ctrl_internal(s, cmd, larg, parg, 0);
32750   }
32751   
32752   long ossl_ctrl_internal(SSL *s, int cmd, long larg, void *parg, int no_quic)
32753   {
32754       long l;
32755       SSL_CONNECTION *sc = ((s) == 
32756   # 2907 "ssl/ssl_lib.c" 3 4
32757                           ((void *)0) 
32758   # 2907 "ssl/ssl_lib.c"
32759                           ? 
32760   # 2907 "ssl/ssl_lib.c" 3 4
32761                           ((void *)0) 
32762   # 2907 "ssl/ssl_lib.c"
32763                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
32764   # 2907 "ssl/ssl_lib.c" 3 4
32765                           ((void *)0)
32766   # 2907 "ssl/ssl_lib.c"
32767                           )));
32768   # 2924 "ssl/ssl_lib.c"
32769       if (!no_quic && ((s) != 
32770   # 2924 "ssl/ssl_lib.c" 3 4
32771                      ((void *)0) 
32772   # 2924 "ssl/ssl_lib.c"
32773                      && ((s)->type == 1 || (s)->type == 2)))
32774           return s->method->ssl_ctrl(s, cmd, larg, parg);
32775   
32776       if (sc == 
32777   # 2927 "ssl/ssl_lib.c" 3 4
32778                ((void *)0)
32779   # 2927 "ssl/ssl_lib.c"
32780                    )
32781           return 0;
32782   
32783       switch (cmd) {
32784       case 40:
32785           return ((&sc->rlayer)->read_ahead);
32786       case 41:
32787           l = ((&sc->rlayer)->read_ahead);
32788           ((&sc->rlayer)->read_ahead = (larg));
32789           return l;
32790   
32791       case 33:
32792       {
32793           OSSL_PARAM options[2], *opts = options;
32794   
32795           sc->mode |= larg;
32796   
32797           *opts++ = OSSL_PARAM_construct_uint32("mode",
32798                                                 &sc->mode);
32799           *opts = OSSL_PARAM_construct_end();
32800   
32801   
32802           sc->rlayer.rrlmethod->set_options(sc->rlayer.rrl, options);
32803   
32804           return sc->mode;
32805       }
32806       case 78:
32807           return (sc->mode &= ~larg);
32808       case 50:
32809           return (long)sc->max_cert_list;
32810       case 51:
32811           if (larg < 0)
32812               return 0;
32813           l = (long)sc->max_cert_list;
32814           sc->max_cert_list = (size_t)larg;
32815           return l;
32816       case 52:
32817           if (larg < 512 || larg > 16384)
32818               return 0;
32819   
32820   
32821   
32822   
32823           sc->max_send_fragment = larg;
32824           if (sc->max_send_fragment < sc->split_send_fragment)
32825               sc->split_send_fragment = sc->max_send_fragment;
32826           sc->rlayer.wrlmethod->set_max_frag_len(sc->rlayer.wrl, larg);
32827           return 1;
32828       case 125:
32829           if ((size_t)larg > sc->max_send_fragment || larg == 0)
32830               return 0;
32831           sc->split_send_fragment = larg;
32832           return 1;
32833       case 126:
32834           if (larg < 1 || larg > 32)
32835               return 0;
32836           sc->max_pipelines = larg;
32837           if (sc->rlayer.rrlmethod->set_max_pipelines != 
32838   # 2984 "ssl/ssl_lib.c" 3 4
32839                                                         ((void *)0)
32840   # 2984 "ssl/ssl_lib.c"
32841                                                             )
32842               sc->rlayer.rrlmethod->set_max_pipelines(sc->rlayer.rrl, (size_t)larg);
32843           return 1;
32844       case 76:
32845           return sc->s3.send_connection_binding;
32846       case 136:
32847           sc->rwstate = 8;
32848           return 1;
32849       case 99:
32850           return (sc->cert->cert_flags |= larg);
32851       case 100:
32852           return (sc->cert->cert_flags &= ~larg);
32853   
32854       case 110:
32855           if (parg) {
32856               if (sc->s3.tmp.ciphers_raw == 
32857   # 2999 "ssl/ssl_lib.c" 3 4
32858                                            ((void *)0)
32859   # 2999 "ssl/ssl_lib.c"
32860                                                )
32861                   return 0;
32862               *(unsigned char **)parg = sc->s3.tmp.ciphers_raw;
32863               return (int)sc->s3.tmp.ciphers_rawlen;
32864           } else {
32865               return 2;
32866           }
32867       case 122:
32868           if (!sc->session || SSL_in_init(s) || ossl_statem_get_in_handshake(sc))
32869               return -1;
32870           if (sc->session->flags & 0x1)
32871               return 1;
32872           else
32873               return 0;
32874       case 123:
32875           return ssl_check_allowed_versions(larg, sc->max_proto_version)
32876                  && ssl_set_version_bound(s->defltmeth->version, (int)larg,
32877                                           &sc->min_proto_version);
32878       case 130:
32879           return sc->min_proto_version;
32880       case 124:
32881           return ssl_check_allowed_versions(sc->min_proto_version, larg)
32882                  && ssl_set_version_bound(s->defltmeth->version, (int)larg,
32883                                           &sc->max_proto_version);
32884       case 131:
32885           return sc->max_proto_version;
32886       default:
32887           if (((s) != 
32888   # 3026 "ssl/ssl_lib.c" 3 4
32889              ((void *)0) 
32890   # 3026 "ssl/ssl_lib.c"
32891              && ((s)->type == 1 || (s)->type == 2)))
32892               return SSL_ctrl((SSL *)sc, cmd, larg, parg);
32893           else
32894               return s->method->ssl_ctrl(s, cmd, larg, parg);
32895       }
32896   }
32897   
32898   long SSL_callback_ctrl(SSL *s, int cmd, void (*fp) (void))
32899   {
32900       return s->method->ssl_callback_ctrl(s, cmd, fp);
32901   }
32902   
32903   struct lhash_st_SSL_SESSION *SSL_CTX_sessions(SSL_CTX *ctx)
32904   {
32905       return ctx->sessions;
32906   }
32907   
32908   static int ssl_tsan_load(SSL_CTX *ctx, _Atomic int *stat)
32909   {
32910       int res = 0;
32911   
32912       if (ssl_tsan_lock(ctx)) {
32913           res = 
32914   # 3048 "ssl/ssl_lib.c" 3 4
32915                __extension__ ({ __auto_type __atomic_load_ptr = (
32916   # 3048 "ssl/ssl_lib.c"
32917                (stat)
32918   # 3048 "ssl/ssl_lib.c" 3 4
32919                ); __typeof__ ((void)0, *__atomic_load_ptr) __atomic_load_tmp; __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, (
32920   # 3048 "ssl/ssl_lib.c"
32921                memory_order_relaxed
32922   # 3048 "ssl/ssl_lib.c" 3 4
32923                )); __atomic_load_tmp; })
32924   # 3048 "ssl/ssl_lib.c"
32925                               ;
32926           ssl_tsan_unlock(ctx);
32927       }
32928       return res;
32929   }
32930   
32931   long SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
32932   {
32933       long l;
32934   
32935       if (ctx == 
32936   # 3058 "ssl/ssl_lib.c" 3 4
32937                 ((void *)0)
32938   # 3058 "ssl/ssl_lib.c"
32939                     ) {
32940           switch (cmd) {
32941           case 92:
32942               return tls1_set_groups_list(ctx, 
32943   # 3061 "ssl/ssl_lib.c" 3 4
32944                                               ((void *)0)
32945   # 3061 "ssl/ssl_lib.c"
32946                                                   , 
32947   # 3061 "ssl/ssl_lib.c" 3 4
32948                                                     ((void *)0)
32949   # 3061 "ssl/ssl_lib.c"
32950                                                         , parg);
32951           case 98:
32952           case 102:
32953               return tls1_set_sigalgs_list(
32954   # 3064 "ssl/ssl_lib.c" 3 4
32955                                           ((void *)0)
32956   # 3064 "ssl/ssl_lib.c"
32957                                               , parg, 0);
32958           default:
32959               return 0;
32960           }
32961       }
32962   
32963       switch (cmd) {
32964       case 40:
32965           return ctx->read_ahead;
32966       case 41:
32967           l = ctx->read_ahead;
32968           ctx->read_ahead = larg;
32969           return l;
32970   
32971       case 16:
32972           ctx->msg_callback_arg = parg;
32973           return 1;
32974   
32975       case 50:
32976           return (long)ctx->max_cert_list;
32977       case 51:
32978           if (larg < 0)
32979               return 0;
32980           l = (long)ctx->max_cert_list;
32981           ctx->max_cert_list = (size_t)larg;
32982           return l;
32983   
32984       case 42:
32985           if (larg < 0)
32986               return 0;
32987           l = (long)ctx->session_cache_size;
32988           ctx->session_cache_size = (size_t)larg;
32989           return l;
32990       case 43:
32991           return (long)ctx->session_cache_size;
32992       case 44:
32993           l = ctx->session_cache_mode;
32994           ctx->session_cache_mode = larg;
32995           return l;
32996       case 45:
32997           return ctx->session_cache_mode;
32998   
32999       case 20:
33000           return lh_SSL_SESSION_num_items(ctx->sessions);
33001       case 21:
33002           return ssl_tsan_load(ctx, &ctx->stats.sess_connect);
33003       case 22:
33004           return ssl_tsan_load(ctx, &ctx->stats.sess_connect_good);
33005       case 23:
33006           return ssl_tsan_load(ctx, &ctx->stats.sess_connect_renegotiate);
33007       case 24:
33008           return ssl_tsan_load(ctx, &ctx->stats.sess_accept);
33009       case 25:
33010           return ssl_tsan_load(ctx, &ctx->stats.sess_accept_good);
33011       case 26:
33012           return ssl_tsan_load(ctx, &ctx->stats.sess_accept_renegotiate);
33013       case 27:
33014           return ssl_tsan_load(ctx, &ctx->stats.sess_hit);
33015       case 28:
33016           return ssl_tsan_load(ctx, &ctx->stats.sess_cb_hit);
33017       case 29:
33018           return ssl_tsan_load(ctx, &ctx->stats.sess_miss);
33019       case 30:
33020           return ssl_tsan_load(ctx, &ctx->stats.sess_timeout);
33021       case 31:
33022           return ssl_tsan_load(ctx, &ctx->stats.sess_cache_full);
33023       case 33:
33024           return (ctx->mode |= larg);
33025       case 78:
33026           return (ctx->mode &= ~larg);
33027       case 52:
33028           if (larg < 512 || larg > 16384)
33029               return 0;
33030           ctx->max_send_fragment = larg;
33031           if (ctx->max_send_fragment < ctx->split_send_fragment)
33032               ctx->split_send_fragment = ctx->max_send_fragment;
33033           return 1;
33034       case 125:
33035           if ((size_t)larg > ctx->max_send_fragment || larg == 0)
33036               return 0;
33037           ctx->split_send_fragment = larg;
33038           return 1;
33039       case 126:
33040           if (larg < 1 || larg > 32)
33041               return 0;
33042           ctx->max_pipelines = larg;
33043           return 1;
33044       case 99:
33045           return (ctx->cert->cert_flags |= larg);
33046       case 100:
33047           return (ctx->cert->cert_flags &= ~larg);
33048       case 123:
33049           return ssl_check_allowed_versions(larg, ctx->max_proto_version)
33050                  && ssl_set_version_bound(ctx->method->version, (int)larg,
33051                                           &ctx->min_proto_version);
33052       case 130:
33053           return ctx->min_proto_version;
33054       case 124:
33055           return ssl_check_allowed_versions(ctx->min_proto_version, larg)
33056                  && ssl_set_version_bound(ctx->method->version, (int)larg,
33057                                           &ctx->max_proto_version);
33058       case 131:
33059           return ctx->max_proto_version;
33060       default:
33061           return ctx->method->ssl_ctx_ctrl(ctx, cmd, larg, parg);
33062       }
33063   }
33064   
33065   long SSL_CTX_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp) (void))
33066   {
33067       switch (cmd) {
33068       case 15:
33069           ctx->msg_callback = (void (*)
33070                                (int write_p, int version, int content_type,
33071                                 const void *buf, size_t len, SSL *ssl,
33072                                 void *arg))(fp);
33073           return 1;
33074   
33075       default:
33076           return ctx->method->ssl_ctx_callback_ctrl(ctx, cmd, fp);
33077       }
33078   }
33079   
33080   int ssl_cipher_id_cmp(const SSL_CIPHER *a, const SSL_CIPHER *b)
33081   {
33082       if (a->id > b->id)
33083           return 1;
33084       if (a->id < b->id)
33085           return -1;
33086       return 0;
33087   }
33088   
33089   int ssl_cipher_ptr_id_cmp(const SSL_CIPHER *const *ap,
33090                             const SSL_CIPHER *const *bp)
33091   {
33092       if ((*ap)->id > (*bp)->id)
33093           return 1;
33094       if ((*ap)->id < (*bp)->id)
33095           return -1;
33096       return 0;
33097   }
33098   
33099   
33100   
33101   
33102   
33103   struct stack_st_SSL_CIPHER *SSL_get_ciphers(const SSL *s)
33104   {
33105       const SSL_CONNECTION *sc = ((s) == 
33106   # 3212 "ssl/ssl_lib.c" 3 4
33107                                 ((void *)0) 
33108   # 3212 "ssl/ssl_lib.c"
33109                                 ? 
33110   # 3212 "ssl/ssl_lib.c" 3 4
33111                                 ((void *)0) 
33112   # 3212 "ssl/ssl_lib.c"
33113                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
33114   # 3212 "ssl/ssl_lib.c" 3 4
33115                                 ((void *)0)
33116   # 3212 "ssl/ssl_lib.c"
33117                                 )));
33118   
33119       if (sc != 
33120   # 3214 "ssl/ssl_lib.c" 3 4
33121                ((void *)0)
33122   # 3214 "ssl/ssl_lib.c"
33123                    ) {
33124           if (sc->cipher_list != 
33125   # 3215 "ssl/ssl_lib.c" 3 4
33126                                 ((void *)0)
33127   # 3215 "ssl/ssl_lib.c"
33128                                     ) {
33129               return sc->cipher_list;
33130           } else if ((s->ctx != 
33131   # 3217 "ssl/ssl_lib.c" 3 4
33132                                ((void *)0)
33133   # 3217 "ssl/ssl_lib.c"
33134                                    ) && (s->ctx->cipher_list != 
33135   # 3217 "ssl/ssl_lib.c" 3 4
33136                                                                 ((void *)0)
33137   # 3217 "ssl/ssl_lib.c"
33138                                                                     )) {
33139               return s->ctx->cipher_list;
33140           }
33141       }
33142       return 
33143   # 3221 "ssl/ssl_lib.c" 3 4
33144             ((void *)0)
33145   # 3221 "ssl/ssl_lib.c"
33146                 ;
33147   }
33148   
33149   struct stack_st_SSL_CIPHER *SSL_get_client_ciphers(const SSL *s)
33150   {
33151       const SSL_CONNECTION *sc = ((s) == 
33152   # 3226 "ssl/ssl_lib.c" 3 4
33153                                 ((void *)0) 
33154   # 3226 "ssl/ssl_lib.c"
33155                                 ? 
33156   # 3226 "ssl/ssl_lib.c" 3 4
33157                                 ((void *)0) 
33158   # 3226 "ssl/ssl_lib.c"
33159                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
33160   # 3226 "ssl/ssl_lib.c" 3 4
33161                                 ((void *)0)
33162   # 3226 "ssl/ssl_lib.c"
33163                                 )));
33164   
33165       if (sc == 
33166   # 3228 "ssl/ssl_lib.c" 3 4
33167                ((void *)0) 
33168   # 3228 "ssl/ssl_lib.c"
33169                     || !sc->server)
33170           return 
33171   # 3229 "ssl/ssl_lib.c" 3 4
33172                 ((void *)0)
33173   # 3229 "ssl/ssl_lib.c"
33174                     ;
33175       return sc->peer_ciphers;
33176   }
33177   
33178   struct stack_st_SSL_CIPHER *SSL_get1_supported_ciphers(SSL *s)
33179   {
33180       struct stack_st_SSL_CIPHER *sk = 
33181   # 3235 "ssl/ssl_lib.c" 3 4
33182                                 ((void *)0)
33183   # 3235 "ssl/ssl_lib.c"
33184                                     , *ciphers;
33185       int i;
33186       SSL_CONNECTION *sc = ((s) == 
33187   # 3237 "ssl/ssl_lib.c" 3 4
33188                           ((void *)0) 
33189   # 3237 "ssl/ssl_lib.c"
33190                           ? 
33191   # 3237 "ssl/ssl_lib.c" 3 4
33192                           ((void *)0) 
33193   # 3237 "ssl/ssl_lib.c"
33194                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
33195   # 3237 "ssl/ssl_lib.c" 3 4
33196                           ((void *)0)
33197   # 3237 "ssl/ssl_lib.c"
33198                           )));
33199   
33200       if (sc == 
33201   # 3239 "ssl/ssl_lib.c" 3 4
33202                ((void *)0)
33203   # 3239 "ssl/ssl_lib.c"
33204                    )
33205           return 
33206   # 3240 "ssl/ssl_lib.c" 3 4
33207                 ((void *)0)
33208   # 3240 "ssl/ssl_lib.c"
33209                     ;
33210   
33211       ciphers = SSL_get_ciphers(s);
33212       if (!ciphers)
33213           return 
33214   # 3244 "ssl/ssl_lib.c" 3 4
33215                 ((void *)0)
33216   # 3244 "ssl/ssl_lib.c"
33217                     ;
33218       if (!ssl_set_client_disabled(sc))
33219           return 
33220   # 3246 "ssl/ssl_lib.c" 3 4
33221                 ((void *)0)
33222   # 3246 "ssl/ssl_lib.c"
33223                     ;
33224       for (i = 0; i < OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(ciphers)); i++) {
33225           const SSL_CIPHER *c = ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(ciphers), (i)));
33226           if (!ssl_cipher_disabled(sc, c, (1 | (1 << 16)), 0)) {
33227               if (!sk)
33228                   sk = ((struct stack_st_SSL_CIPHER *)OPENSSL_sk_new_null());
33229               if (!sk)
33230                   return 
33231   # 3253 "ssl/ssl_lib.c" 3 4
33232                         ((void *)0)
33233   # 3253 "ssl/ssl_lib.c"
33234                             ;
33235               if (!OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(c))) {
33236                   OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk));
33237                   return 
33238   # 3256 "ssl/ssl_lib.c" 3 4
33239                         ((void *)0)
33240   # 3256 "ssl/ssl_lib.c"
33241                             ;
33242               }
33243           }
33244       }
33245       return sk;
33246   }
33247   
33248   
33249   
33250   struct stack_st_SSL_CIPHER *ssl_get_ciphers_by_id(SSL_CONNECTION *s)
33251   {
33252       if (s != 
33253   # 3267 "ssl/ssl_lib.c" 3 4
33254               ((void *)0)
33255   # 3267 "ssl/ssl_lib.c"
33256                   ) {
33257           if (s->cipher_list_by_id != 
33258   # 3268 "ssl/ssl_lib.c" 3 4
33259                                      ((void *)0)
33260   # 3268 "ssl/ssl_lib.c"
33261                                          )
33262               return s->cipher_list_by_id;
33263           else if (s->ssl.ctx != 
33264   # 3270 "ssl/ssl_lib.c" 3 4
33265                                 ((void *)0)
33266                    
33267   # 3271 "ssl/ssl_lib.c"
33268                   && s->ssl.ctx->cipher_list_by_id != 
33269   # 3271 "ssl/ssl_lib.c" 3 4
33270                                                       ((void *)0)
33271   # 3271 "ssl/ssl_lib.c"
33272                                                           )
33273               return s->ssl.ctx->cipher_list_by_id;
33274       }
33275       return 
33276   # 3274 "ssl/ssl_lib.c" 3 4
33277             ((void *)0)
33278   # 3274 "ssl/ssl_lib.c"
33279                 ;
33280   }
33281   
33282   
33283   const char *SSL_get_cipher_list(const SSL *s, int n)
33284   {
33285       const SSL_CIPHER *c;
33286       struct stack_st_SSL_CIPHER *sk;
33287   
33288       if (s == 
33289   # 3283 "ssl/ssl_lib.c" 3 4
33290               ((void *)0)
33291   # 3283 "ssl/ssl_lib.c"
33292                   )
33293           return 
33294   # 3284 "ssl/ssl_lib.c" 3 4
33295                 ((void *)0)
33296   # 3284 "ssl/ssl_lib.c"
33297                     ;
33298       sk = SSL_get_ciphers(s);
33299       if ((sk == 
33300   # 3286 "ssl/ssl_lib.c" 3 4
33301                 ((void *)0)
33302   # 3286 "ssl/ssl_lib.c"
33303                     ) || (OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk)) <= n))
33304           return 
33305   # 3287 "ssl/ssl_lib.c" 3 4
33306                 ((void *)0)
33307   # 3287 "ssl/ssl_lib.c"
33308                     ;
33309       c = ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (n)));
33310       if (c == 
33311   # 3289 "ssl/ssl_lib.c" 3 4
33312               ((void *)0)
33313   # 3289 "ssl/ssl_lib.c"
33314                   )
33315           return 
33316   # 3290 "ssl/ssl_lib.c" 3 4
33317                 ((void *)0)
33318   # 3290 "ssl/ssl_lib.c"
33319                     ;
33320       return c->name;
33321   }
33322   
33323   
33324   
33325   struct stack_st_SSL_CIPHER *SSL_CTX_get_ciphers(const SSL_CTX *ctx)
33326   {
33327       if (ctx != 
33328   # 3298 "ssl/ssl_lib.c" 3 4
33329                 ((void *)0)
33330   # 3298 "ssl/ssl_lib.c"
33331                     )
33332           return ctx->cipher_list;
33333       return 
33334   # 3300 "ssl/ssl_lib.c" 3 4
33335             ((void *)0)
33336   # 3300 "ssl/ssl_lib.c"
33337                 ;
33338   }
33339   
33340   
33341   
33342   
33343   
33344   static int cipher_list_tls12_num(struct stack_st_SSL_CIPHER *sk)
33345   {
33346       int i, num = 0;
33347       const SSL_CIPHER *c;
33348   
33349       if (sk == 
33350   # 3312 "ssl/ssl_lib.c" 3 4
33351                ((void *)0)
33352   # 3312 "ssl/ssl_lib.c"
33353                    )
33354           return 0;
33355       for (i = 0; i < OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk)); ++i) {
33356           c = ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (i)));
33357           if (c->min_tls >= 0x0304)
33358               continue;
33359           num++;
33360       }
33361       return num;
33362   }
33363   
33364   
33365   int SSL_CTX_set_cipher_list(SSL_CTX *ctx, const char *str)
33366   {
33367       struct stack_st_SSL_CIPHER *sk;
33368   
33369       sk = ssl_create_cipher_list(ctx, ctx->tls13_ciphersuites,
33370                                   &ctx->cipher_list, &ctx->cipher_list_by_id, str,
33371                                   ctx->cert);
33372   
33373   
33374   
33375   
33376   
33377   
33378   
33379       if (sk == 
33380   # 3338 "ssl/ssl_lib.c" 3 4
33381                ((void *)0)
33382   # 3338 "ssl/ssl_lib.c"
33383                    )
33384           return 0;
33385       else if (cipher_list_tls12_num(sk) == 0) {
33386           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3341,__func__), ERR_set_error)((20),(185),
33387   # 3341 "ssl/ssl_lib.c" 3 4
33388          ((void *)0)
33389   # 3341 "ssl/ssl_lib.c"
33390          );
33391           return 0;
33392       }
33393       return 1;
33394   }
33395   
33396   
33397   int SSL_set_cipher_list(SSL *s, const char *str)
33398   {
33399       struct stack_st_SSL_CIPHER *sk;
33400       SSL_CONNECTION *sc = ((s) == 
33401   # 3351 "ssl/ssl_lib.c" 3 4
33402                           ((void *)0) 
33403   # 3351 "ssl/ssl_lib.c"
33404                           ? 
33405   # 3351 "ssl/ssl_lib.c" 3 4
33406                           ((void *)0) 
33407   # 3351 "ssl/ssl_lib.c"
33408                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
33409   # 3351 "ssl/ssl_lib.c" 3 4
33410                           ((void *)0)
33411   # 3351 "ssl/ssl_lib.c"
33412                           )));
33413   
33414       if (sc == 
33415   # 3353 "ssl/ssl_lib.c" 3 4
33416                ((void *)0)
33417   # 3353 "ssl/ssl_lib.c"
33418                    )
33419           return 0;
33420   
33421       sk = ssl_create_cipher_list(s->ctx, sc->tls13_ciphersuites,
33422                                   &sc->cipher_list, &sc->cipher_list_by_id, str,
33423                                   sc->cert);
33424   
33425       if (sk == 
33426   # 3360 "ssl/ssl_lib.c" 3 4
33427                ((void *)0)
33428   # 3360 "ssl/ssl_lib.c"
33429                    )
33430           return 0;
33431       else if (cipher_list_tls12_num(sk) == 0) {
33432           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3363,__func__), ERR_set_error)((20),(185),
33433   # 3363 "ssl/ssl_lib.c" 3 4
33434          ((void *)0)
33435   # 3363 "ssl/ssl_lib.c"
33436          );
33437           return 0;
33438       }
33439       return 1;
33440   }
33441   
33442   char *SSL_get_shared_ciphers(const SSL *s, char *buf, int size)
33443   {
33444       char *p;
33445       struct stack_st_SSL_CIPHER *clntsk, *srvrsk;
33446       const SSL_CIPHER *c;
33447       int i;
33448       const SSL_CONNECTION *sc = ((s) == 
33449   # 3375 "ssl/ssl_lib.c" 3 4
33450                                 ((void *)0) 
33451   # 3375 "ssl/ssl_lib.c"
33452                                 ? 
33453   # 3375 "ssl/ssl_lib.c" 3 4
33454                                 ((void *)0) 
33455   # 3375 "ssl/ssl_lib.c"
33456                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
33457   # 3375 "ssl/ssl_lib.c" 3 4
33458                                 ((void *)0)
33459   # 3375 "ssl/ssl_lib.c"
33460                                 )));
33461   
33462       if (sc == 
33463   # 3377 "ssl/ssl_lib.c" 3 4
33464                ((void *)0)
33465   # 3377 "ssl/ssl_lib.c"
33466                    )
33467           return 
33468   # 3378 "ssl/ssl_lib.c" 3 4
33469                 ((void *)0)
33470   # 3378 "ssl/ssl_lib.c"
33471                     ;
33472   
33473       if (!sc->server
33474               || sc->peer_ciphers == 
33475   # 3381 "ssl/ssl_lib.c" 3 4
33476                                     ((void *)0)
33477               
33478   # 3382 "ssl/ssl_lib.c"
33479              || size < 2)
33480           return 
33481   # 3383 "ssl/ssl_lib.c" 3 4
33482                 ((void *)0)
33483   # 3383 "ssl/ssl_lib.c"
33484                     ;
33485   
33486       p = buf;
33487       clntsk = sc->peer_ciphers;
33488       srvrsk = SSL_get_ciphers(s);
33489       if (clntsk == 
33490   # 3388 "ssl/ssl_lib.c" 3 4
33491                    ((void *)0) 
33492   # 3388 "ssl/ssl_lib.c"
33493                         || srvrsk == 
33494   # 3388 "ssl/ssl_lib.c" 3 4
33495                                      ((void *)0)
33496   # 3388 "ssl/ssl_lib.c"
33497                                          )
33498           return 
33499   # 3389 "ssl/ssl_lib.c" 3 4
33500                 ((void *)0)
33501   # 3389 "ssl/ssl_lib.c"
33502                     ;
33503   
33504       if (OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(clntsk)) == 0 || OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(srvrsk)) == 0)
33505           return 
33506   # 3392 "ssl/ssl_lib.c" 3 4
33507                 ((void *)0)
33508   # 3392 "ssl/ssl_lib.c"
33509                     ;
33510   
33511       for (i = 0; i < OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(clntsk)); i++) {
33512           int n;
33513   
33514           c = ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(clntsk), (i)));
33515           if (OPENSSL_sk_find(ossl_check_SSL_CIPHER_sk_type(srvrsk), ossl_check_SSL_CIPHER_type(c)) < 0)
33516               continue;
33517   
33518           n = OPENSSL_strnlen(c->name, size);
33519           if (n >= size) {
33520               if (p != buf)
33521                   --p;
33522               *p = '\0';
33523               return buf;
33524           }
33525           memcpy(p, c->name, n);
33526           p += n;
33527           *(p++) = ':';
33528           size -= n + 1;
33529       }
33530       p[-1] = '\0';
33531       return buf;
33532   }
33533   # 3427 "ssl/ssl_lib.c"
33534   const char *SSL_get_servername(const SSL *s, const int type)
33535   {
33536       const SSL_CONNECTION *sc = ((s) == 
33537   # 3429 "ssl/ssl_lib.c" 3 4
33538                                 ((void *)0) 
33539   # 3429 "ssl/ssl_lib.c"
33540                                 ? 
33541   # 3429 "ssl/ssl_lib.c" 3 4
33542                                 ((void *)0) 
33543   # 3429 "ssl/ssl_lib.c"
33544                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
33545   # 3429 "ssl/ssl_lib.c" 3 4
33546                                 ((void *)0)
33547   # 3429 "ssl/ssl_lib.c"
33548                                 )));
33549       int server;
33550   
33551       if (sc == 
33552   # 3432 "ssl/ssl_lib.c" 3 4
33553                ((void *)0)
33554   # 3432 "ssl/ssl_lib.c"
33555                    )
33556           return 
33557   # 3433 "ssl/ssl_lib.c" 3 4
33558                 ((void *)0)
33559   # 3433 "ssl/ssl_lib.c"
33560                     ;
33561   
33562   
33563   
33564   
33565   
33566       server = sc->handshake_func == 
33567   # 3439 "ssl/ssl_lib.c" 3 4
33568                                     ((void *)0) 
33569   # 3439 "ssl/ssl_lib.c"
33570                                          ? 0 : sc->server;
33571   
33572       if (type != 0)
33573           return 
33574   # 3442 "ssl/ssl_lib.c" 3 4
33575                 ((void *)0)
33576   # 3442 "ssl/ssl_lib.c"
33577                     ;
33578   
33579       if (server) {
33580   # 3461 "ssl/ssl_lib.c"
33581            if (sc->hit && !(!((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8) && (&(sc)->ssl)->method->version >= 0x0304 && (&(sc)->ssl)->method->version != 0x10000))
33582               return sc->session->ext.hostname;
33583       } else {
33584   # 3486 "ssl/ssl_lib.c"
33585           if (SSL_in_before(s)) {
33586               if (sc->ext.hostname == 
33587   # 3487 "ssl/ssl_lib.c" 3 4
33588                                      ((void *)0)
33589                       
33590   # 3488 "ssl/ssl_lib.c"
33591                      && sc->session != 
33592   # 3488 "ssl/ssl_lib.c" 3 4
33593                                        ((void *)0)
33594                       
33595   # 3489 "ssl/ssl_lib.c"
33596                      && sc->session->ssl_version != 0x0304)
33597                   return sc->session->ext.hostname;
33598           } else {
33599               if (!(!((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8) && (&(sc)->ssl)->method->version >= 0x0304 && (&(sc)->ssl)->method->version != 0x10000) && sc->hit
33600                   && sc->session->ext.hostname != 
33601   # 3493 "ssl/ssl_lib.c" 3 4
33602                                                  ((void *)0)
33603   # 3493 "ssl/ssl_lib.c"
33604                                                      )
33605                   return sc->session->ext.hostname;
33606           }
33607       }
33608   
33609       return sc->ext.hostname;
33610   }
33611   
33612   int SSL_get_servername_type(const SSL *s)
33613   {
33614       if (SSL_get_servername(s, 0) != 
33615   # 3503 "ssl/ssl_lib.c" 3 4
33616                                                              ((void *)0)
33617   # 3503 "ssl/ssl_lib.c"
33618                                                                  )
33619           return 0;
33620       return -1;
33621   }
33622   # 3528 "ssl/ssl_lib.c"
33623   int SSL_select_next_proto(unsigned char **out, unsigned char *outlen,
33624                             const unsigned char *server,
33625                             unsigned int server_len,
33626                             const unsigned char *client, unsigned int client_len)
33627   {
33628       unsigned int i, j;
33629       const unsigned char *result;
33630       int status = 0;
33631   
33632   
33633   
33634   
33635       for (i = 0; i < server_len;) {
33636           for (j = 0; j < client_len;) {
33637               if (server[i] == client[j] &&
33638                   memcmp(&server[i + 1], &client[j + 1], server[i]) == 0) {
33639   
33640                   result = &server[i];
33641                   status = 1;
33642                   goto found;
33643               }
33644               j += client[j];
33645               j++;
33646           }
33647           i += server[i];
33648           i++;
33649       }
33650   
33651   
33652       result = client;
33653       status = 2;
33654   
33655    found:
33656       *out = (unsigned char *)result + 1;
33657       *outlen = result[0];
33658       return status;
33659   }
33660   # 3575 "ssl/ssl_lib.c"
33661   void SSL_get0_next_proto_negotiated(const SSL *s, const unsigned char **data,
33662                                       unsigned *len)
33663   {
33664       const SSL_CONNECTION *sc = ((s) == 
33665   # 3578 "ssl/ssl_lib.c" 3 4
33666                                 ((void *)0) 
33667   # 3578 "ssl/ssl_lib.c"
33668                                 ? 
33669   # 3578 "ssl/ssl_lib.c" 3 4
33670                                 ((void *)0) 
33671   # 3578 "ssl/ssl_lib.c"
33672                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
33673   # 3578 "ssl/ssl_lib.c" 3 4
33674                                 ((void *)0)
33675   # 3578 "ssl/ssl_lib.c"
33676                                 )));
33677   
33678       if (sc == 
33679   # 3580 "ssl/ssl_lib.c" 3 4
33680                ((void *)0)
33681   # 3580 "ssl/ssl_lib.c"
33682                    ) {
33683   
33684           *data = 
33685   # 3582 "ssl/ssl_lib.c" 3 4
33686                  ((void *)0)
33687   # 3582 "ssl/ssl_lib.c"
33688                      ;
33689           *len = 0;
33690           return;
33691       }
33692   
33693       *data = sc->ext.npn;
33694       if (*data == 
33695   # 3588 "ssl/ssl_lib.c" 3 4
33696                   ((void *)0)
33697   # 3588 "ssl/ssl_lib.c"
33698                       ) {
33699           *len = 0;
33700       } else {
33701           *len = (unsigned int)sc->ext.npn_len;
33702       }
33703   }
33704   # 3605 "ssl/ssl_lib.c"
33705   void SSL_CTX_set_next_protos_advertised_cb(SSL_CTX *ctx,
33706                                      SSL_CTX_npn_advertised_cb_func cb,
33707                                      void *arg)
33708   {
33709       if ((((ctx)->method) == OSSL_QUIC_client_method() || ((ctx)->method) == OSSL_QUIC_client_thread_method()))
33710   
33711           return;
33712   
33713       ctx->ext.npn_advertised_cb = cb;
33714       ctx->ext.npn_advertised_cb_arg = arg;
33715   }
33716   # 3627 "ssl/ssl_lib.c"
33717   void SSL_CTX_set_next_proto_select_cb(SSL_CTX *ctx,
33718                                  SSL_CTX_npn_select_cb_func cb,
33719                                  void *arg)
33720   {
33721       if ((((ctx)->method) == OSSL_QUIC_client_method() || ((ctx)->method) == OSSL_QUIC_client_thread_method()))
33722   
33723           return;
33724   
33725       ctx->ext.npn_select_cb = cb;
33726       ctx->ext.npn_select_cb_arg = arg;
33727   }
33728   
33729   
33730   static int alpn_value_ok(const unsigned char *protos, unsigned int protos_len)
33731   {
33732       unsigned int idx;
33733   
33734       if (protos_len < 2 || protos == 
33735   # 3644 "ssl/ssl_lib.c" 3 4
33736                                      ((void *)0)
33737   # 3644 "ssl/ssl_lib.c"
33738                                          )
33739           return 0;
33740   
33741       for (idx = 0; idx < protos_len; idx += protos[idx] + 1) {
33742           if (protos[idx] == 0)
33743               return 0;
33744       }
33745       return idx == protos_len;
33746   }
33747   
33748   
33749   
33750   
33751   
33752   int SSL_CTX_set_alpn_protos(SSL_CTX *ctx, const unsigned char *protos,
33753                               unsigned int protos_len)
33754   {
33755       unsigned char *alpn;
33756   
33757       if (protos_len == 0 || protos == 
33758   # 3663 "ssl/ssl_lib.c" 3 4
33759                                       ((void *)0)
33760   # 3663 "ssl/ssl_lib.c"
33761                                           ) {
33762           CRYPTO_free(ctx->ext.alpn, "ssl/ssl_lib.c", 3664);
33763           ctx->ext.alpn = 
33764   # 3665 "ssl/ssl_lib.c" 3 4
33765                          ((void *)0)
33766   # 3665 "ssl/ssl_lib.c"
33767                              ;
33768           ctx->ext.alpn_len = 0;
33769           return 0;
33770       }
33771   
33772       if (!alpn_value_ok(protos, protos_len))
33773           return 1;
33774   
33775       alpn = CRYPTO_memdup((protos), protos_len, "ssl/ssl_lib.c", 3673);
33776       if (alpn == 
33777   # 3674 "ssl/ssl_lib.c" 3 4
33778                  ((void *)0)
33779   # 3674 "ssl/ssl_lib.c"
33780                      )
33781           return 1;
33782       CRYPTO_free(ctx->ext.alpn, "ssl/ssl_lib.c", 3676);
33783       ctx->ext.alpn = alpn;
33784       ctx->ext.alpn_len = protos_len;
33785   
33786       return 0;
33787   }
33788   
33789   
33790   
33791   
33792   
33793   
33794   int SSL_set_alpn_protos(SSL *ssl, const unsigned char *protos,
33795                           unsigned int protos_len)
33796   {
33797       unsigned char *alpn;
33798       SSL_CONNECTION *sc = ((ssl) == 
33799   # 3692 "ssl/ssl_lib.c" 3 4
33800                           ((void *)0) 
33801   # 3692 "ssl/ssl_lib.c"
33802                           ? 
33803   # 3692 "ssl/ssl_lib.c" 3 4
33804                           ((void *)0) 
33805   # 3692 "ssl/ssl_lib.c"
33806                           : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls : 
33807   # 3692 "ssl/ssl_lib.c" 3 4
33808                           ((void *)0)
33809   # 3692 "ssl/ssl_lib.c"
33810                           )));
33811   
33812       if (sc == 
33813   # 3694 "ssl/ssl_lib.c" 3 4
33814                ((void *)0)
33815   # 3694 "ssl/ssl_lib.c"
33816                    )
33817           return 1;
33818   
33819       if (protos_len == 0 || protos == 
33820   # 3697 "ssl/ssl_lib.c" 3 4
33821                                       ((void *)0)
33822   # 3697 "ssl/ssl_lib.c"
33823                                           ) {
33824           CRYPTO_free(sc->ext.alpn, "ssl/ssl_lib.c", 3698);
33825           sc->ext.alpn = 
33826   # 3699 "ssl/ssl_lib.c" 3 4
33827                         ((void *)0)
33828   # 3699 "ssl/ssl_lib.c"
33829                             ;
33830           sc->ext.alpn_len = 0;
33831           return 0;
33832       }
33833   
33834       if (!alpn_value_ok(protos, protos_len))
33835           return 1;
33836   
33837       alpn = CRYPTO_memdup((protos), protos_len, "ssl/ssl_lib.c", 3707);
33838       if (alpn == 
33839   # 3708 "ssl/ssl_lib.c" 3 4
33840                  ((void *)0)
33841   # 3708 "ssl/ssl_lib.c"
33842                      )
33843           return 1;
33844       CRYPTO_free(sc->ext.alpn, "ssl/ssl_lib.c", 3710);
33845       sc->ext.alpn = alpn;
33846       sc->ext.alpn_len = protos_len;
33847   
33848       return 0;
33849   }
33850   
33851   
33852   
33853   
33854   
33855   
33856   void SSL_CTX_set_alpn_select_cb(SSL_CTX *ctx,
33857                                   SSL_CTX_alpn_select_cb_func cb,
33858                                   void *arg)
33859   {
33860       ctx->ext.alpn_select_cb = cb;
33861       ctx->ext.alpn_select_cb_arg = arg;
33862   }
33863   
33864   
33865   
33866   
33867   
33868   
33869   
33870   void SSL_get0_alpn_selected(const SSL *ssl, const unsigned char **data,
33871                               unsigned int *len)
33872   {
33873       const SSL_CONNECTION *sc = ((ssl) == 
33874   # 3739 "ssl/ssl_lib.c" 3 4
33875                                 ((void *)0) 
33876   # 3739 "ssl/ssl_lib.c"
33877                                 ? 
33878   # 3739 "ssl/ssl_lib.c" 3 4
33879                                 ((void *)0) 
33880   # 3739 "ssl/ssl_lib.c"
33881                                 : ((ssl)->type == 0 ? (const SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(ssl))->tls : 
33882   # 3739 "ssl/ssl_lib.c" 3 4
33883                                 ((void *)0)
33884   # 3739 "ssl/ssl_lib.c"
33885                                 )));
33886   
33887       if (sc == 
33888   # 3741 "ssl/ssl_lib.c" 3 4
33889                ((void *)0)
33890   # 3741 "ssl/ssl_lib.c"
33891                    ) {
33892   
33893           *data = 
33894   # 3743 "ssl/ssl_lib.c" 3 4
33895                  ((void *)0)
33896   # 3743 "ssl/ssl_lib.c"
33897                      ;
33898           *len = 0;
33899           return;
33900       }
33901   
33902       *data = sc->s3.alpn_selected;
33903       if (*data == 
33904   # 3749 "ssl/ssl_lib.c" 3 4
33905                   ((void *)0)
33906   # 3749 "ssl/ssl_lib.c"
33907                       )
33908           *len = 0;
33909       else
33910           *len = (unsigned int)sc->s3.alpn_selected_len;
33911   }
33912   
33913   int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,
33914                                  const char *label, size_t llen,
33915                                  const unsigned char *context, size_t contextlen,
33916                                  int use_context)
33917   {
33918       SSL_CONNECTION *sc = ((s) == 
33919   # 3760 "ssl/ssl_lib.c" 3 4
33920                           ((void *)0) 
33921   # 3760 "ssl/ssl_lib.c"
33922                           ? 
33923   # 3760 "ssl/ssl_lib.c" 3 4
33924                           ((void *)0) 
33925   # 3760 "ssl/ssl_lib.c"
33926                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
33927   # 3760 "ssl/ssl_lib.c" 3 4
33928                           ((void *)0)
33929   # 3760 "ssl/ssl_lib.c"
33930                           )));
33931   
33932       if (sc == 
33933   # 3762 "ssl/ssl_lib.c" 3 4
33934                ((void *)0)
33935   # 3762 "ssl/ssl_lib.c"
33936                    )
33937           return -1;
33938   
33939       if (sc->session == 
33940   # 3765 "ssl/ssl_lib.c" 3 4
33941                         ((void *)0)
33942           
33943   # 3766 "ssl/ssl_lib.c"
33944          || (sc->version < 0x0301 && sc->version != 0x0100))
33945           return -1;
33946   
33947       return sc->ssl.method->ssl3_enc->export_keying_material(sc, out, olen, label,
33948                                                               llen, context,
33949                                                               contextlen,
33950                                                               use_context);
33951   }
33952   
33953   int SSL_export_keying_material_early(SSL *s, unsigned char *out, size_t olen,
33954                                        const char *label, size_t llen,
33955                                        const unsigned char *context,
33956                                        size_t contextlen)
33957   {
33958       SSL_CONNECTION *sc = ((s) == 
33959   # 3780 "ssl/ssl_lib.c" 3 4
33960                           ((void *)0) 
33961   # 3780 "ssl/ssl_lib.c"
33962                           ? 
33963   # 3780 "ssl/ssl_lib.c" 3 4
33964                           ((void *)0) 
33965   # 3780 "ssl/ssl_lib.c"
33966                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
33967   # 3780 "ssl/ssl_lib.c" 3 4
33968                           ((void *)0)
33969   # 3780 "ssl/ssl_lib.c"
33970                           )));
33971   
33972       if (sc == 
33973   # 3782 "ssl/ssl_lib.c" 3 4
33974                ((void *)0)
33975   # 3782 "ssl/ssl_lib.c"
33976                    )
33977           return -1;
33978   
33979       if (sc->version != 0x0304)
33980           return 0;
33981   
33982       return tls13_export_keying_material_early(sc, out, olen, label, llen,
33983                                                 context, contextlen);
33984   }
33985   
33986   static unsigned long ssl_session_hash(const SSL_SESSION *a)
33987   {
33988       const unsigned char *session_id = a->session_id;
33989       unsigned long l;
33990       unsigned char tmp_storage[4];
33991   
33992       if (a->session_id_length < sizeof(tmp_storage)) {
33993           memset(tmp_storage, 0, sizeof(tmp_storage));
33994           memcpy(tmp_storage, a->session_id, a->session_id_length);
33995           session_id = tmp_storage;
33996       }
33997   
33998       l = (unsigned long)
33999           ((unsigned long)session_id[0]) |
34000           ((unsigned long)session_id[1] << 8L) |
34001           ((unsigned long)session_id[2] << 16L) |
34002           ((unsigned long)session_id[3] << 24L);
34003       return l;
34004   }
34005   # 3819 "ssl/ssl_lib.c"
34006   static int ssl_session_cmp(const SSL_SESSION *a, const SSL_SESSION *b)
34007   {
34008       if (a->ssl_version != b->ssl_version)
34009           return 1;
34010       if (a->session_id_length != b->session_id_length)
34011           return 1;
34012       return memcmp(a->session_id, b->session_id, a->session_id_length);
34013   }
34014   # 3835 "ssl/ssl_lib.c"
34015   SSL_CTX *SSL_CTX_new_ex(OSSL_LIB_CTX *libctx, const char *propq,
34016                           const SSL_METHOD *meth)
34017   {
34018       SSL_CTX *ret = 
34019   # 3838 "ssl/ssl_lib.c" 3 4
34020                     ((void *)0)
34021   # 3838 "ssl/ssl_lib.c"
34022                         ;
34023   
34024   
34025   
34026   
34027       if (meth == 
34028   # 3843 "ssl/ssl_lib.c" 3 4
34029                  ((void *)0)
34030   # 3843 "ssl/ssl_lib.c"
34031                      ) {
34032           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3844,__func__), ERR_set_error)((20),(196),
34033   # 3844 "ssl/ssl_lib.c" 3 4
34034          ((void *)0)
34035   # 3844 "ssl/ssl_lib.c"
34036          );
34037           return 
34038   # 3845 "ssl/ssl_lib.c" 3 4
34039                 ((void *)0)
34040   # 3845 "ssl/ssl_lib.c"
34041                     ;
34042       }
34043   
34044       if (!OPENSSL_init_ssl(0x00200000L, 
34045   # 3848 "ssl/ssl_lib.c" 3 4
34046                                                           ((void *)0)
34047   # 3848 "ssl/ssl_lib.c"
34048                                                               ))
34049           return 
34050   # 3849 "ssl/ssl_lib.c" 3 4
34051                 ((void *)0)
34052   # 3849 "ssl/ssl_lib.c"
34053                     ;
34054   
34055   
34056       if (SSL_get_ex_data_X509_STORE_CTX_idx() < 0) {
34057           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3853,__func__), ERR_set_error)((20),(269),
34058   # 3853 "ssl/ssl_lib.c" 3 4
34059          ((void *)0)
34060   # 3853 "ssl/ssl_lib.c"
34061          );
34062           goto err;
34063       }
34064   
34065       ret = CRYPTO_zalloc(sizeof(*ret), "ssl/ssl_lib.c", 3857);
34066       if (ret == 
34067   # 3858 "ssl/ssl_lib.c" 3 4
34068                 ((void *)0)
34069   # 3858 "ssl/ssl_lib.c"
34070                     )
34071           return 
34072   # 3859 "ssl/ssl_lib.c" 3 4
34073                 ((void *)0)
34074   # 3859 "ssl/ssl_lib.c"
34075                     ;
34076   
34077   
34078       if (!CRYPTO_NEW_REF(&ret->references, 1)) {
34079           CRYPTO_free(ret, "ssl/ssl_lib.c", 3863);
34080           return 
34081   # 3864 "ssl/ssl_lib.c" 3 4
34082                 ((void *)0)
34083   # 3864 "ssl/ssl_lib.c"
34084                     ;
34085       }
34086   
34087       ret->lock = CRYPTO_THREAD_lock_new();
34088       if (ret->lock == 
34089   # 3868 "ssl/ssl_lib.c" 3 4
34090                       ((void *)0)
34091   # 3868 "ssl/ssl_lib.c"
34092                           ) {
34093           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3869,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
34094   # 3869 "ssl/ssl_lib.c" 3 4
34095          ((void *)0)
34096   # 3869 "ssl/ssl_lib.c"
34097          );
34098           goto err;
34099       }
34100   # 3881 "ssl/ssl_lib.c"
34101       ret->libctx = libctx;
34102       if (propq != 
34103   # 3882 "ssl/ssl_lib.c" 3 4
34104                   ((void *)0)
34105   # 3882 "ssl/ssl_lib.c"
34106                       ) {
34107           ret->propq = CRYPTO_strdup(propq, "ssl/ssl_lib.c", 3883);
34108           if (ret->propq == 
34109   # 3884 "ssl/ssl_lib.c" 3 4
34110                            ((void *)0)
34111   # 3884 "ssl/ssl_lib.c"
34112                                )
34113               goto err;
34114       }
34115   
34116       ret->method = meth;
34117       ret->min_proto_version = 0;
34118       ret->max_proto_version = 0;
34119       ret->mode = 0x00000004U;
34120       ret->session_cache_mode = 0x0002;
34121       ret->session_cache_size = (1024*20);
34122   
34123       ret->session_timeout = meth->get_timeout();
34124       ret->max_cert_list = (1024*100);
34125       ret->verify_mode = 0x00;
34126   
34127       ret->sessions = lh_SSL_SESSION_new(ssl_session_hash, ssl_session_cmp);
34128       if (ret->sessions == 
34129   # 3900 "ssl/ssl_lib.c" 3 4
34130                           ((void *)0)
34131   # 3900 "ssl/ssl_lib.c"
34132                               ) {
34133           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3901,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
34134   # 3901 "ssl/ssl_lib.c" 3 4
34135          ((void *)0)
34136   # 3901 "ssl/ssl_lib.c"
34137          );
34138           goto err;
34139       }
34140       ret->cert_store = X509_STORE_new();
34141       if (ret->cert_store == 
34142   # 3905 "ssl/ssl_lib.c" 3 4
34143                             ((void *)0)
34144   # 3905 "ssl/ssl_lib.c"
34145                                 ) {
34146           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3906,__func__), ERR_set_error)((20),((11 | (0x2 << 18L))),
34147   # 3906 "ssl/ssl_lib.c" 3 4
34148          ((void *)0)
34149   # 3906 "ssl/ssl_lib.c"
34150          );
34151           goto err;
34152       }
34153   
34154       ret->ctlog_store = CTLOG_STORE_new_ex(libctx, propq);
34155       if (ret->ctlog_store == 
34156   # 3911 "ssl/ssl_lib.c" 3 4
34157                              ((void *)0)
34158   # 3911 "ssl/ssl_lib.c"
34159                                  ) {
34160           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3912,__func__), ERR_set_error)((20),((50 | (0x2 << 18L))),
34161   # 3912 "ssl/ssl_lib.c" 3 4
34162          ((void *)0)
34163   # 3912 "ssl/ssl_lib.c"
34164          );
34165           goto err;
34166       }
34167   
34168   
34169   
34170       if (!ssl_load_ciphers(ret)) {
34171           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3919,__func__), ERR_set_error)((20),((20 | (0x2 << 18L))),
34172   # 3919 "ssl/ssl_lib.c" 3 4
34173          ((void *)0)
34174   # 3919 "ssl/ssl_lib.c"
34175          );
34176           goto err;
34177       }
34178   
34179       if (!ssl_load_groups(ret)) {
34180           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3924,__func__), ERR_set_error)((20),((20 | (0x2 << 18L))),
34181   # 3924 "ssl/ssl_lib.c" 3 4
34182          ((void *)0)
34183   # 3924 "ssl/ssl_lib.c"
34184          );
34185           goto err;
34186       }
34187   
34188   
34189       if (!ssl_load_sigalgs(ret)) {
34190           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3930,__func__), ERR_set_error)((20),((20 | (0x2 << 18L))),
34191   # 3930 "ssl/ssl_lib.c" 3 4
34192          ((void *)0)
34193   # 3930 "ssl/ssl_lib.c"
34194          );
34195           goto err;
34196       }
34197   
34198   
34199       if (!ssl_setup_sigalgs(ret)) {
34200           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3936,__func__), ERR_set_error)((20),((20 | (0x2 << 18L))),
34201   # 3936 "ssl/ssl_lib.c" 3 4
34202          ((void *)0)
34203   # 3936 "ssl/ssl_lib.c"
34204          );
34205           goto err;
34206       }
34207   
34208       if (!SSL_CTX_set_ciphersuites(ret, OSSL_default_ciphersuites())) {
34209           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3941,__func__), ERR_set_error)((20),((20 | (0x2 << 18L))),
34210   # 3941 "ssl/ssl_lib.c" 3 4
34211          ((void *)0)
34212   # 3941 "ssl/ssl_lib.c"
34213          );
34214           goto err;
34215       }
34216   
34217       if ((ret->cert = ssl_cert_new(9 + ret->sigalg_list_len)) == 
34218   # 3945 "ssl/ssl_lib.c" 3 4
34219                                                                             ((void *)0)
34220   # 3945 "ssl/ssl_lib.c"
34221                                                                                 ) {
34222           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3946,__func__), ERR_set_error)((20),((20 | (0x2 << 18L))),
34223   # 3946 "ssl/ssl_lib.c" 3 4
34224          ((void *)0)
34225   # 3946 "ssl/ssl_lib.c"
34226          );
34227           goto err;
34228       }
34229   
34230       if (!ssl_create_cipher_list(ret,
34231                                   ret->tls13_ciphersuites,
34232                                   &ret->cipher_list, &ret->cipher_list_by_id,
34233                                   OSSL_default_cipher_list(), ret->cert)
34234           || OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(ret->cipher_list)) <= 0) {
34235           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3955,__func__), ERR_set_error)((20),(161),
34236   # 3955 "ssl/ssl_lib.c" 3 4
34237          ((void *)0)
34238   # 3955 "ssl/ssl_lib.c"
34239          );
34240           goto err;
34241       }
34242   
34243       ret->param = X509_VERIFY_PARAM_new();
34244       if (ret->param == 
34245   # 3960 "ssl/ssl_lib.c" 3 4
34246                        ((void *)0)
34247   # 3960 "ssl/ssl_lib.c"
34248                            ) {
34249           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3961,__func__), ERR_set_error)((20),((11 | (0x2 << 18L))),
34250   # 3961 "ssl/ssl_lib.c" 3 4
34251          ((void *)0)
34252   # 3961 "ssl/ssl_lib.c"
34253          );
34254           goto err;
34255       }
34256   
34257   
34258   
34259   
34260   
34261       ret->md5 = ssl_evp_md_fetch(libctx, 4, propq);
34262       ret->sha1 = ssl_evp_md_fetch(libctx, 64, propq);
34263   
34264       if ((ret->ca_names = ((struct stack_st_X509_NAME *)OPENSSL_sk_new_null())) == 
34265   # 3972 "ssl/ssl_lib.c" 3 4
34266                                                       ((void *)0)
34267   # 3972 "ssl/ssl_lib.c"
34268                                                           ) {
34269           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3973,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
34270   # 3973 "ssl/ssl_lib.c" 3 4
34271          ((void *)0)
34272   # 3973 "ssl/ssl_lib.c"
34273          );
34274           goto err;
34275       }
34276   
34277       if ((ret->client_ca_names = ((struct stack_st_X509_NAME *)OPENSSL_sk_new_null())) == 
34278   # 3977 "ssl/ssl_lib.c" 3 4
34279                                                              ((void *)0)
34280   # 3977 "ssl/ssl_lib.c"
34281                                                                  ) {
34282           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3978,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
34283   # 3978 "ssl/ssl_lib.c" 3 4
34284          ((void *)0)
34285   # 3978 "ssl/ssl_lib.c"
34286          );
34287           goto err;
34288       }
34289   
34290       if (!CRYPTO_new_ex_data(1, ret, &ret->ex_data)) {
34291           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",3983,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
34292   # 3983 "ssl/ssl_lib.c" 3 4
34293          ((void *)0)
34294   # 3983 "ssl/ssl_lib.c"
34295          );
34296           goto err;
34297       }
34298   
34299       if ((ret->ext.secure = CRYPTO_secure_zalloc(sizeof(*ret->ext.secure), "ssl/ssl_lib.c", 3987)) == 
34300   # 3987 "ssl/ssl_lib.c" 3 4
34301                                                                                 ((void *)0)
34302   # 3987 "ssl/ssl_lib.c"
34303                                                                                     )
34304           goto err;
34305   
34306   
34307       if (!(meth->ssl3_enc->enc_flags & 0x8))
34308           ret->comp_methods = SSL_COMP_get_compression_methods();
34309   
34310       ret->max_send_fragment = 16384;
34311       ret->split_send_fragment = 16384;
34312   
34313   
34314       if ((RAND_bytes_ex(libctx, ret->ext.tick_key_name,
34315                          sizeof(ret->ext.tick_key_name), 0) <= 0)
34316           || (RAND_priv_bytes_ex(libctx, ret->ext.secure->tick_hmac_key,
34317                                  sizeof(ret->ext.secure->tick_hmac_key), 0) <= 0)
34318           || (RAND_priv_bytes_ex(libctx, ret->ext.secure->tick_aes_key,
34319                                  sizeof(ret->ext.secure->tick_aes_key), 0) <= 0))
34320           ret->options |= ((uint64_t)1 << (uint64_t)14);
34321   
34322       if (RAND_priv_bytes_ex(libctx, ret->ext.cookie_hmac_key,
34323                              sizeof(ret->ext.cookie_hmac_key), 0) <= 0) {
34324           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",4008,__func__), ERR_set_error)((20),((36 | (0x2 << 18L))),
34325   # 4008 "ssl/ssl_lib.c" 3 4
34326          ((void *)0)
34327   # 4008 "ssl/ssl_lib.c"
34328          );
34329           goto err;
34330       }
34331   
34332   
34333       if (!ssl_ctx_srp_ctx_init_intern(ret)) {
34334           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",4014,__func__), ERR_set_error)((20),((20 | (0x2 << 18L))),
34335   # 4014 "ssl/ssl_lib.c" 3 4
34336          ((void *)0)
34337   # 4014 "ssl/ssl_lib.c"
34338          );
34339           goto err;
34340       }
34341   # 4059 "ssl/ssl_lib.c"
34342       ret->options |= ((uint64_t)1 << (uint64_t)17) | ((uint64_t)1 << (uint64_t)20);
34343   
34344       ret->ext.status_type = -1;
34345   # 4079 "ssl/ssl_lib.c"
34346       ret->max_early_data = 0;
34347   # 4089 "ssl/ssl_lib.c"
34348       ret->recv_max_early_data = 16384;
34349   
34350   
34351       ret->num_tickets = 2;
34352   
34353       ssl_ctx_system_config(ret);
34354   
34355       return ret;
34356    err:
34357       SSL_CTX_free(ret);
34358       return 
34359   # 4099 "ssl/ssl_lib.c" 3 4
34360             ((void *)0)
34361   # 4099 "ssl/ssl_lib.c"
34362                 ;
34363   }
34364   
34365   SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth)
34366   {
34367       return SSL_CTX_new_ex(
34368   # 4104 "ssl/ssl_lib.c" 3 4
34369                            ((void *)0)
34370   # 4104 "ssl/ssl_lib.c"
34371                                , 
34372   # 4104 "ssl/ssl_lib.c" 3 4
34373                                  ((void *)0)
34374   # 4104 "ssl/ssl_lib.c"
34375                                      , meth);
34376   }
34377   
34378   int SSL_CTX_up_ref(SSL_CTX *ctx)
34379   {
34380       int i;
34381   
34382       if (CRYPTO_UP_REF(&ctx->references, &i) <= 0)
34383           return 0;
34384   
34385       ((void)0);;
34386       ;
34387       return ((i > 1) ? 1 : 0);
34388   }
34389   
34390   void SSL_CTX_free(SSL_CTX *a)
34391   {
34392       int i;
34393       size_t j;
34394   
34395       if (a == 
34396   # 4124 "ssl/ssl_lib.c" 3 4
34397               ((void *)0)
34398   # 4124 "ssl/ssl_lib.c"
34399                   )
34400           return;
34401   
34402       CRYPTO_DOWN_REF(&a->references, &i);
34403       ((void)0);;
34404       if (i > 0)
34405           return;
34406       ;
34407   
34408       X509_VERIFY_PARAM_free(a->param);
34409       dane_ctx_final(&a->dane);
34410   # 4145 "ssl/ssl_lib.c"
34411       if (a->sessions != 
34412   # 4145 "ssl/ssl_lib.c" 3 4
34413                         ((void *)0)
34414   # 4145 "ssl/ssl_lib.c"
34415                             )
34416           SSL_CTX_flush_sessions(a, 0);
34417   
34418       CRYPTO_free_ex_data(1, a, &a->ex_data);
34419       lh_SSL_SESSION_free(a->sessions);
34420       X509_STORE_free(a->cert_store);
34421   
34422       CTLOG_STORE_free(a->ctlog_store);
34423   
34424       OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(a->cipher_list));
34425       OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(a->cipher_list_by_id));
34426       OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(a->tls13_ciphersuites));
34427       ssl_cert_free(a->cert);
34428       OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(a->ca_names),ossl_check_X509_NAME_freefunc_type(X509_NAME_free));
34429       OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(a->client_ca_names),ossl_check_X509_NAME_freefunc_type(X509_NAME_free));
34430       OSSL_STACK_OF_X509_free(a->extra_certs);
34431       a->comp_methods = 
34432   # 4161 "ssl/ssl_lib.c" 3 4
34433                        ((void *)0)
34434   # 4161 "ssl/ssl_lib.c"
34435                            ;
34436   
34437       OPENSSL_sk_free(ossl_check_SRTP_PROTECTION_PROFILE_sk_type(a->srtp_profiles));
34438   
34439   
34440       ssl_ctx_srp_ctx_free_intern(a);
34441   
34442   
34443       tls_engine_finish(a->client_cert_engine);
34444   
34445   
34446       CRYPTO_free(a->ext.ecpointformats, "ssl/ssl_lib.c", 4172);
34447       CRYPTO_free(a->ext.supportedgroups, "ssl/ssl_lib.c", 4173);
34448       CRYPTO_free(a->ext.supported_groups_default, "ssl/ssl_lib.c", 4174);
34449       CRYPTO_free(a->ext.alpn, "ssl/ssl_lib.c", 4175);
34450       CRYPTO_secure_free(a->ext.secure, "ssl/ssl_lib.c", 4176);
34451   
34452       ssl_evp_md_free(a->md5);
34453       ssl_evp_md_free(a->sha1);
34454   
34455       for (j = 0; j < 24; j++)
34456           ssl_evp_cipher_free(a->ssl_cipher_methods[j]);
34457       for (j = 0; j < 14; j++)
34458           ssl_evp_md_free(a->ssl_digest_methods[j]);
34459       for (j = 0; j < a->group_list_len; j++) {
34460           CRYPTO_free(a->group_list[j].tlsname, "ssl/ssl_lib.c", 4186);
34461           CRYPTO_free(a->group_list[j].realname, "ssl/ssl_lib.c", 4187);
34462           CRYPTO_free(a->group_list[j].algorithm, "ssl/ssl_lib.c", 4188);
34463       }
34464       CRYPTO_free(a->group_list, "ssl/ssl_lib.c", 4190);
34465       for (j = 0; j < a->sigalg_list_len; j++) {
34466           CRYPTO_free(a->sigalg_list[j].name, "ssl/ssl_lib.c", 4192);
34467           CRYPTO_free(a->sigalg_list[j].sigalg_name, "ssl/ssl_lib.c", 4193);
34468           CRYPTO_free(a->sigalg_list[j].sigalg_oid, "ssl/ssl_lib.c", 4194);
34469           CRYPTO_free(a->sigalg_list[j].sig_name, "ssl/ssl_lib.c", 4195);
34470           CRYPTO_free(a->sigalg_list[j].sig_oid, "ssl/ssl_lib.c", 4196);
34471           CRYPTO_free(a->sigalg_list[j].hash_name, "ssl/ssl_lib.c", 4197);
34472           CRYPTO_free(a->sigalg_list[j].hash_oid, "ssl/ssl_lib.c", 4198);
34473           CRYPTO_free(a->sigalg_list[j].keytype, "ssl/ssl_lib.c", 4199);
34474           CRYPTO_free(a->sigalg_list[j].keytype_oid, "ssl/ssl_lib.c", 4200);
34475       }
34476       CRYPTO_free(a->sigalg_list, "ssl/ssl_lib.c", 4202);
34477       CRYPTO_free(a->ssl_cert_info, "ssl/ssl_lib.c", 4203);
34478   
34479       CRYPTO_free(a->sigalg_lookup_cache, "ssl/ssl_lib.c", 4205);
34480       CRYPTO_free(a->tls12_sigalgs, "ssl/ssl_lib.c", 4206);
34481   
34482       CRYPTO_free(a->client_cert_type, "ssl/ssl_lib.c", 4208);
34483       CRYPTO_free(a->server_cert_type, "ssl/ssl_lib.c", 4209);
34484   
34485       CRYPTO_THREAD_lock_free(a->lock);
34486       CRYPTO_FREE_REF(&a->references);
34487   
34488   
34489   
34490   
34491       CRYPTO_free(a->propq, "ssl/ssl_lib.c", 4217);
34492   
34493       CRYPTO_free(a->qlog_title, "ssl/ssl_lib.c", 4219);
34494   
34495   
34496       CRYPTO_free(a, "ssl/ssl_lib.c", 4222);
34497   }
34498   
34499   void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb)
34500   {
34501       ctx->default_passwd_callback = cb;
34502   }
34503   
34504   void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u)
34505   {
34506       ctx->default_passwd_callback_userdata = u;
34507   }
34508   
34509   pem_password_cb *SSL_CTX_get_default_passwd_cb(SSL_CTX *ctx)
34510   {
34511       return ctx->default_passwd_callback;
34512   }
34513   
34514   void *SSL_CTX_get_default_passwd_cb_userdata(SSL_CTX *ctx)
34515   {
34516       return ctx->default_passwd_callback_userdata;
34517   }
34518   
34519   void SSL_set_default_passwd_cb(SSL *s, pem_password_cb *cb)
34520   {
34521       SSL_CONNECTION *sc = ((s) == 
34522   # 4247 "ssl/ssl_lib.c" 3 4
34523                           ((void *)0) 
34524   # 4247 "ssl/ssl_lib.c"
34525                           ? 
34526   # 4247 "ssl/ssl_lib.c" 3 4
34527                           ((void *)0) 
34528   # 4247 "ssl/ssl_lib.c"
34529                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
34530   # 4247 "ssl/ssl_lib.c" 3 4
34531                           ((void *)0)
34532   # 4247 "ssl/ssl_lib.c"
34533                           )));
34534   
34535       if (sc == 
34536   # 4249 "ssl/ssl_lib.c" 3 4
34537                ((void *)0)
34538   # 4249 "ssl/ssl_lib.c"
34539                    )
34540           return;
34541   
34542       sc->default_passwd_callback = cb;
34543   }
34544   
34545   void SSL_set_default_passwd_cb_userdata(SSL *s, void *u)
34546   {
34547       SSL_CONNECTION *sc = ((s) == 
34548   # 4257 "ssl/ssl_lib.c" 3 4
34549                           ((void *)0) 
34550   # 4257 "ssl/ssl_lib.c"
34551                           ? 
34552   # 4257 "ssl/ssl_lib.c" 3 4
34553                           ((void *)0) 
34554   # 4257 "ssl/ssl_lib.c"
34555                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
34556   # 4257 "ssl/ssl_lib.c" 3 4
34557                           ((void *)0)
34558   # 4257 "ssl/ssl_lib.c"
34559                           )));
34560   
34561       if (sc == 
34562   # 4259 "ssl/ssl_lib.c" 3 4
34563                ((void *)0)
34564   # 4259 "ssl/ssl_lib.c"
34565                    )
34566           return;
34567   
34568       sc->default_passwd_callback_userdata = u;
34569   }
34570   
34571   pem_password_cb *SSL_get_default_passwd_cb(SSL *s)
34572   {
34573       SSL_CONNECTION *sc = ((s) == 
34574   # 4267 "ssl/ssl_lib.c" 3 4
34575                           ((void *)0) 
34576   # 4267 "ssl/ssl_lib.c"
34577                           ? 
34578   # 4267 "ssl/ssl_lib.c" 3 4
34579                           ((void *)0) 
34580   # 4267 "ssl/ssl_lib.c"
34581                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
34582   # 4267 "ssl/ssl_lib.c" 3 4
34583                           ((void *)0)
34584   # 4267 "ssl/ssl_lib.c"
34585                           )));
34586   
34587       if (sc == 
34588   # 4269 "ssl/ssl_lib.c" 3 4
34589                ((void *)0)
34590   # 4269 "ssl/ssl_lib.c"
34591                    )
34592           return 
34593   # 4270 "ssl/ssl_lib.c" 3 4
34594                 ((void *)0)
34595   # 4270 "ssl/ssl_lib.c"
34596                     ;
34597   
34598       return sc->default_passwd_callback;
34599   }
34600   
34601   void *SSL_get_default_passwd_cb_userdata(SSL *s)
34602   {
34603       SSL_CONNECTION *sc = ((s) == 
34604   # 4277 "ssl/ssl_lib.c" 3 4
34605                           ((void *)0) 
34606   # 4277 "ssl/ssl_lib.c"
34607                           ? 
34608   # 4277 "ssl/ssl_lib.c" 3 4
34609                           ((void *)0) 
34610   # 4277 "ssl/ssl_lib.c"
34611                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
34612   # 4277 "ssl/ssl_lib.c" 3 4
34613                           ((void *)0)
34614   # 4277 "ssl/ssl_lib.c"
34615                           )));
34616   
34617       if (sc == 
34618   # 4279 "ssl/ssl_lib.c" 3 4
34619                ((void *)0)
34620   # 4279 "ssl/ssl_lib.c"
34621                    )
34622           return 
34623   # 4280 "ssl/ssl_lib.c" 3 4
34624                 ((void *)0)
34625   # 4280 "ssl/ssl_lib.c"
34626                     ;
34627   
34628       return sc->default_passwd_callback_userdata;
34629   }
34630   
34631   void SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx,
34632                                         int (*cb) (X509_STORE_CTX *, void *),
34633                                         void *arg)
34634   {
34635       ctx->app_verify_callback = cb;
34636       ctx->app_verify_arg = arg;
34637   }
34638   
34639   void SSL_CTX_set_verify(SSL_CTX *ctx, int mode,
34640                           int (*cb) (int, X509_STORE_CTX *))
34641   {
34642       ctx->verify_mode = mode;
34643       ctx->default_verify_callback = cb;
34644   }
34645   
34646   void SSL_CTX_set_verify_depth(SSL_CTX *ctx, int depth)
34647   {
34648       X509_VERIFY_PARAM_set_depth(ctx->param, depth);
34649   }
34650   
34651   void SSL_CTX_set_cert_cb(SSL_CTX *c, int (*cb) (SSL *ssl, void *arg), void *arg)
34652   {
34653       ssl_cert_set_cert_cb(c->cert, cb, arg);
34654   }
34655   
34656   void SSL_set_cert_cb(SSL *s, int (*cb) (SSL *ssl, void *arg), void *arg)
34657   {
34658       SSL_CONNECTION *sc = ((s) == 
34659   # 4312 "ssl/ssl_lib.c" 3 4
34660                           ((void *)0) 
34661   # 4312 "ssl/ssl_lib.c"
34662                           ? 
34663   # 4312 "ssl/ssl_lib.c" 3 4
34664                           ((void *)0) 
34665   # 4312 "ssl/ssl_lib.c"
34666                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
34667   # 4312 "ssl/ssl_lib.c" 3 4
34668                           ((void *)0)
34669   # 4312 "ssl/ssl_lib.c"
34670                           )));
34671   
34672       if (sc == 
34673   # 4314 "ssl/ssl_lib.c" 3 4
34674                ((void *)0)
34675   # 4314 "ssl/ssl_lib.c"
34676                    )
34677           return;
34678   
34679       ssl_cert_set_cert_cb(sc->cert, cb, arg);
34680   }
34681   
34682   void ssl_set_masks(SSL_CONNECTION *s)
34683   {
34684       CERT *c = s->cert;
34685       uint32_t *pvalid = s->s3.tmp.valid_flags;
34686       int rsa_enc, rsa_sign, dh_tmp, dsa_sign;
34687       unsigned long mask_k, mask_a;
34688       int have_ecc_cert, ecdsa_ok;
34689   
34690       if (c == 
34691   # 4328 "ssl/ssl_lib.c" 3 4
34692               ((void *)0)
34693   # 4328 "ssl/ssl_lib.c"
34694                   )
34695           return;
34696   
34697       dh_tmp = (c->dh_tmp != 
34698   # 4331 "ssl/ssl_lib.c" 3 4
34699                             ((void *)0)
34700                 
34701   # 4332 "ssl/ssl_lib.c"
34702                || c->dh_tmp_cb != 
34703   # 4332 "ssl/ssl_lib.c" 3 4
34704                                   ((void *)0)
34705                 
34706   # 4333 "ssl/ssl_lib.c"
34707                || c->dh_tmp_auto);
34708   
34709       rsa_enc = pvalid[0] & 0x1;
34710       rsa_sign = pvalid[0] & 0x1;
34711       dsa_sign = pvalid[2] & 0x1;
34712       have_ecc_cert = pvalid[3] & 0x1;
34713       mask_k = 0;
34714       mask_a = 0;
34715   
34716       ((void)0)
34717                                                      ;
34718   
34719   
34720       if (ssl_has_cert(s, 6)) {
34721           mask_k |= 0x00000010U | 0x00000200U;
34722           mask_a |= 0x00000080U;
34723       }
34724       if (ssl_has_cert(s, 5)) {
34725           mask_k |= 0x00000010U | 0x00000200U;
34726           mask_a |= 0x00000080U;
34727       }
34728       if (ssl_has_cert(s, 4)) {
34729           mask_k |= 0x00000010U;
34730           mask_a |= 0x00000020U;
34731       }
34732   
34733   
34734       if (rsa_enc)
34735           mask_k |= 0x00000001U;
34736   
34737       if (dh_tmp)
34738           mask_k |= 0x00000002U;
34739   
34740   
34741   
34742   
34743   
34744   
34745       if (rsa_enc || rsa_sign || (ssl_has_cert(s, 1)
34746                   && pvalid[1] & 0x100
34747                   && ((SSL_version(&s->ssl) >> 8) == 0x03 ? SSL_version(&s->ssl) : 0) == 0x0303))
34748           mask_a |= 0x00000001U;
34749   
34750       if (dsa_sign) {
34751           mask_a |= 0x00000002U;
34752       }
34753   
34754       mask_a |= 0x00000004U;
34755   
34756   
34757   
34758   
34759   
34760       if (pvalid[0] & 0x1000) {
34761           mask_a |= 0x00000001U;
34762           mask_k |= 0x00000001U;
34763       }
34764       if (pvalid[3] & 0x1000)
34765           mask_a |= 0x00000008U;
34766       if (((SSL_version(&s->ssl) >> 8) == 0x03 ? SSL_version(&s->ssl) : 0) == 0x0303) {
34767           if (pvalid[1] & 0x1000)
34768               mask_a |= 0x00000001U;
34769           if (pvalid[7] & 0x1000
34770                   || pvalid[8] & 0x1000)
34771               mask_a |= 0x00000008U;
34772       }
34773   
34774   
34775   
34776   
34777   
34778       if (have_ecc_cert) {
34779           uint32_t ex_kusage;
34780           ex_kusage = X509_get_key_usage(c->pkeys[3].x509);
34781           ecdsa_ok = ex_kusage & 0x0080;
34782           if (!(pvalid[3] & 0x2))
34783               ecdsa_ok = 0;
34784           if (ecdsa_ok)
34785               mask_a |= 0x00000008U;
34786       }
34787   
34788       if (!(mask_a & 0x00000008U) && ssl_has_cert(s, 7)
34789               && pvalid[7] & 0x100
34790               && ((SSL_version(&s->ssl) >> 8) == 0x03 ? SSL_version(&s->ssl) : 0) == 0x0303)
34791               mask_a |= 0x00000008U;
34792   
34793   
34794       if (!(mask_a & 0x00000008U) && ssl_has_cert(s, 8)
34795               && pvalid[8] & 0x100
34796               && ((SSL_version(&s->ssl) >> 8) == 0x03 ? SSL_version(&s->ssl) : 0) == 0x0303)
34797               mask_a |= 0x00000008U;
34798   
34799       mask_k |= 0x00000004U;
34800   
34801   
34802       mask_k |= 0x00000008U;
34803       mask_a |= 0x00000010U;
34804       if (mask_k & 0x00000001U)
34805           mask_k |= 0x00000040U;
34806       if (mask_k & 0x00000002U)
34807           mask_k |= 0x00000100U;
34808       if (mask_k & 0x00000004U)
34809           mask_k |= 0x00000080U;
34810   
34811   
34812       s->s3.tmp.mask_k = mask_k;
34813       s->s3.tmp.mask_a = mask_a;
34814   }
34815   
34816   int ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL_CONNECTION *s)
34817   {
34818       if (s->s3.tmp.new_cipher->algorithm_auth & 0x00000008U) {
34819   
34820           if (!(X509_get_key_usage(x) & 0x0080)) {
34821               (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",4447,__func__), ERR_set_error)((20),(318),
34822   # 4447 "ssl/ssl_lib.c" 3 4
34823              ((void *)0)
34824   # 4447 "ssl/ssl_lib.c"
34825              );
34826               return 0;
34827           }
34828       }
34829       return 1;
34830   }
34831   
34832   int ssl_get_server_cert_serverinfo(SSL_CONNECTION *s,
34833                                      const unsigned char **serverinfo,
34834                                      size_t *serverinfo_length)
34835   {
34836       CERT_PKEY *cpk = s->s3.tmp.cert;
34837       *serverinfo_length = 0;
34838   
34839       if (cpk == 
34840   # 4461 "ssl/ssl_lib.c" 3 4
34841                 ((void *)0) 
34842   # 4461 "ssl/ssl_lib.c"
34843                      || cpk->serverinfo == 
34844   # 4461 "ssl/ssl_lib.c" 3 4
34845                                            ((void *)0)
34846   # 4461 "ssl/ssl_lib.c"
34847                                                )
34848           return 0;
34849   
34850       *serverinfo = cpk->serverinfo;
34851       *serverinfo_length = cpk->serverinfo_length;
34852       return 1;
34853   }
34854   
34855   void ssl_update_cache(SSL_CONNECTION *s, int mode)
34856   {
34857       int i;
34858   
34859   
34860   
34861   
34862   
34863       if (s->session->session_id_length == 0)
34864           return;
34865   # 4489 "ssl/ssl_lib.c"
34866       if (s->server && s->session->sid_ctx_length == 0
34867               && (s->verify_mode & 0x01) != 0)
34868           return;
34869   
34870       i = s->session_ctx->session_cache_mode;
34871       if ((i & mode) != 0
34872           && (!s->hit || (!((&(s)->ssl)->method->ssl3_enc->enc_flags & 0x8) && (&(s)->ssl)->method->version >= 0x0304 && (&(s)->ssl)->method->version != 0x10000))) {
34873   # 4507 "ssl/ssl_lib.c"
34874           if ((i & 0x0200) == 0
34875                   && (!(!((&(s)->ssl)->method->ssl3_enc->enc_flags & 0x8) && (&(s)->ssl)->method->version >= 0x0304 && (&(s)->ssl)->method->version != 0x10000)
34876                       || !s->server
34877                       || (s->max_early_data > 0
34878                           && (s->options & ((uint64_t)1 << (uint64_t)24)) == 0)
34879                       || s->session_ctx->remove_session_cb != 
34880   # 4512 "ssl/ssl_lib.c" 3 4
34881                                                              ((void *)0)
34882                       
34883   # 4513 "ssl/ssl_lib.c"
34884                      || (s->options & ((uint64_t)1 << (uint64_t)14)) != 0))
34885               SSL_CTX_add_session(s->session_ctx, s->session);
34886   
34887   
34888   
34889   
34890   
34891   
34892           if (s->session_ctx->new_session_cb != 
34893   # 4521 "ssl/ssl_lib.c" 3 4
34894                                                ((void *)0)
34895   # 4521 "ssl/ssl_lib.c"
34896                                                    ) {
34897               SSL_SESSION_up_ref(s->session);
34898               if (!s->session_ctx->new_session_cb((&(s)->ssl),
34899                                                   s->session))
34900                   SSL_SESSION_free(s->session);
34901           }
34902       }
34903   
34904   
34905       if ((!(i & 0x0080)) && ((i & mode) == mode)) {
34906           _Atomic int *stat;
34907   
34908           if (mode & 0x0001)
34909               stat = &s->session_ctx->stats.sess_connect_good;
34910           else
34911               stat = &s->session_ctx->stats.sess_accept_good;
34912           if ((ssl_tsan_load(s->session_ctx, stat) & 0xff) == 0xff)
34913               SSL_CTX_flush_sessions(s->session_ctx, (unsigned long)time(
34914   # 4538 "ssl/ssl_lib.c" 3 4
34915                                                                         ((void *)0)
34916   # 4538 "ssl/ssl_lib.c"
34917                                                                             ));
34918       }
34919   }
34920   
34921   const SSL_METHOD *SSL_CTX_get_ssl_method(const SSL_CTX *ctx)
34922   {
34923       return ctx->method;
34924   }
34925   
34926   const SSL_METHOD *SSL_get_ssl_method(const SSL *s)
34927   {
34928       return s->method;
34929   }
34930   
34931   int SSL_set_ssl_method(SSL *s, const SSL_METHOD *meth)
34932   {
34933       int ret = 1;
34934       SSL_CONNECTION *sc = ((s) == 
34935   # 4555 "ssl/ssl_lib.c" 3 4
34936                           ((void *)0) 
34937   # 4555 "ssl/ssl_lib.c"
34938                           ? 
34939   # 4555 "ssl/ssl_lib.c" 3 4
34940                           ((void *)0) 
34941   # 4555 "ssl/ssl_lib.c"
34942                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
34943   # 4555 "ssl/ssl_lib.c" 3 4
34944                           ((void *)0)
34945   # 4555 "ssl/ssl_lib.c"
34946                           )));
34947   
34948   
34949       if (sc == 
34950   # 4558 "ssl/ssl_lib.c" 3 4
34951                ((void *)0)
34952           
34953   # 4559 "ssl/ssl_lib.c"
34954          || (s->type != 0 && s->method != meth)
34955           || (s->type == 0 && ((meth) == OSSL_QUIC_client_method() || (meth) == OSSL_QUIC_client_thread_method())))
34956           return 0;
34957   
34958       if (s->method != meth) {
34959           const SSL_METHOD *sm = s->method;
34960           int (*hf) (SSL *) = sc->handshake_func;
34961   
34962           if (sm->version == meth->version)
34963               s->method = meth;
34964           else {
34965               sm->ssl_deinit(s);
34966               s->method = meth;
34967               ret = s->method->ssl_init(s);
34968           }
34969   
34970           if (hf == sm->ssl_connect)
34971               sc->handshake_func = meth->ssl_connect;
34972           else if (hf == sm->ssl_accept)
34973               sc->handshake_func = meth->ssl_accept;
34974       }
34975       return ret;
34976   }
34977   
34978   int SSL_get_error(const SSL *s, int i)
34979   {
34980       return ossl_ssl_get_error(s, i, 1);
34981   }
34982   
34983   int ossl_ssl_get_error(const SSL *s, int i, int check_err)
34984   {
34985       int reason;
34986       unsigned long l;
34987       BIO *bio;
34988       const SSL_CONNECTION *sc = ((s) == 
34989   # 4593 "ssl/ssl_lib.c" 3 4
34990                                 ((void *)0) 
34991   # 4593 "ssl/ssl_lib.c"
34992                                 ? 
34993   # 4593 "ssl/ssl_lib.c" 3 4
34994                                 ((void *)0) 
34995   # 4593 "ssl/ssl_lib.c"
34996                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
34997   # 4593 "ssl/ssl_lib.c" 3 4
34998                                 ((void *)0)
34999   # 4593 "ssl/ssl_lib.c"
35000                                 )));
35001   
35002       if (i > 0)
35003           return 0;
35004   
35005   
35006       if (((s) != 
35007   # 4599 "ssl/ssl_lib.c" 3 4
35008          ((void *)0) 
35009   # 4599 "ssl/ssl_lib.c"
35010          && ((s)->type == 1 || (s)->type == 2))) {
35011           reason = ossl_quic_get_error(s, i);
35012           if (reason != 0)
35013               return reason;
35014       }
35015   
35016   
35017       if (sc == 
35018   # 4606 "ssl/ssl_lib.c" 3 4
35019                ((void *)0)
35020   # 4606 "ssl/ssl_lib.c"
35021                    )
35022           return 1;
35023   
35024   
35025   
35026   
35027   
35028       if (check_err && (l = ERR_peek_error()) != 0) {
35029           if (ERR_GET_LIB(l) == 2)
35030               return 5;
35031           else
35032               return 1;
35033       }
35034   
35035   
35036       if (!((s) != 
35037   # 4621 "ssl/ssl_lib.c" 3 4
35038           ((void *)0) 
35039   # 4621 "ssl/ssl_lib.c"
35040           && ((s)->type == 1 || (s)->type == 2)))
35041   
35042       {
35043           if ((SSL_want(s) == 3)) {
35044               bio = SSL_get_rbio(s);
35045               if (BIO_test_flags(bio, 0x01))
35046                   return 2;
35047               else if (BIO_test_flags(bio, 0x02))
35048   # 4638 "ssl/ssl_lib.c"
35049                   return 3;
35050               else if (BIO_test_flags(bio, 0x04)) {
35051                   reason = BIO_get_retry_reason(bio);
35052                   if (reason == 0x02)
35053                       return 7;
35054                   else if (reason == 0x03)
35055                       return 8;
35056                   else
35057                       return 5;
35058               }
35059           }
35060   
35061           if ((SSL_want(s) == 2)) {
35062   
35063   
35064   
35065   
35066               bio = sc->wbio;
35067               if (BIO_test_flags(bio, 0x02))
35068                   return 3;
35069               else if (BIO_test_flags(bio, 0x01))
35070   
35071   
35072   
35073                   return 2;
35074               else if (BIO_test_flags(bio, 0x04)) {
35075                   reason = BIO_get_retry_reason(bio);
35076                   if (reason == 0x02)
35077                       return 7;
35078                   else if (reason == 0x03)
35079                       return 8;
35080                   else
35081                       return 5;
35082               }
35083           }
35084       }
35085   
35086       if ((SSL_want(s) == 4))
35087           return 4;
35088       if ((SSL_want(s) == 8))
35089           return 12;
35090       if ((SSL_want(s) == 5))
35091           return 9;
35092       if ((SSL_want(s) == 6))
35093           return 10;
35094       if ((SSL_want(s) == 7))
35095           return 11;
35096   
35097       if ((sc->shutdown & 2) &&
35098           (sc->s3.warn_alert == 0))
35099           return 6;
35100   
35101       return 5;
35102   }
35103   
35104   static int ssl_do_handshake_intern(void *vargs)
35105   {
35106       struct ssl_async_args *args = (struct ssl_async_args *)vargs;
35107       SSL *s = args->s;
35108       SSL_CONNECTION *sc = ((s) == 
35109   # 4697 "ssl/ssl_lib.c" 3 4
35110                           ((void *)0) 
35111   # 4697 "ssl/ssl_lib.c"
35112                           ? 
35113   # 4697 "ssl/ssl_lib.c" 3 4
35114                           ((void *)0) 
35115   # 4697 "ssl/ssl_lib.c"
35116                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
35117   # 4697 "ssl/ssl_lib.c" 3 4
35118                           ((void *)0)
35119   # 4697 "ssl/ssl_lib.c"
35120                           )));
35121   
35122       if (sc == 
35123   # 4699 "ssl/ssl_lib.c" 3 4
35124                ((void *)0)
35125   # 4699 "ssl/ssl_lib.c"
35126                    )
35127           return -1;
35128   
35129       return sc->handshake_func(s);
35130   }
35131   
35132   int SSL_do_handshake(SSL *s)
35133   {
35134       int ret = 1;
35135       SSL_CONNECTION *sc = ((s) == 
35136   # 4708 "ssl/ssl_lib.c" 3 4
35137                           ((void *)0) 
35138   # 4708 "ssl/ssl_lib.c"
35139                           ? 
35140   # 4708 "ssl/ssl_lib.c" 3 4
35141                           ((void *)0) 
35142   # 4708 "ssl/ssl_lib.c"
35143                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
35144   # 4708 "ssl/ssl_lib.c" 3 4
35145                           ((void *)0)
35146   # 4708 "ssl/ssl_lib.c"
35147                           )));
35148   
35149   
35150       if (((s) != 
35151   # 4711 "ssl/ssl_lib.c" 3 4
35152          ((void *)0) 
35153   # 4711 "ssl/ssl_lib.c"
35154          && ((s)->type == 1 || (s)->type == 2)))
35155           return ossl_quic_do_handshake(s);
35156   
35157   
35158       if (sc->handshake_func == 
35159   # 4715 "ssl/ssl_lib.c" 3 4
35160                                ((void *)0)
35161   # 4715 "ssl/ssl_lib.c"
35162                                    ) {
35163           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",4716,__func__), ERR_set_error)((20),(144),
35164   # 4716 "ssl/ssl_lib.c" 3 4
35165          ((void *)0)
35166   # 4716 "ssl/ssl_lib.c"
35167          );
35168           return -1;
35169       }
35170   
35171       ossl_statem_check_finish_init(sc, -1);
35172   
35173       s->method->ssl_renegotiate_check(s, 0);
35174   
35175       if (SSL_in_init(s) || SSL_in_before(s)) {
35176           if ((sc->mode & 0x00000100U) && ASYNC_get_current_job() == 
35177   # 4725 "ssl/ssl_lib.c" 3 4
35178                                                                        ((void *)0)
35179   # 4725 "ssl/ssl_lib.c"
35180                                                                            ) {
35181               struct ssl_async_args args;
35182   
35183               memset(&args, 0, sizeof(args));
35184               args.s = s;
35185   
35186               ret = ssl_start_async_job(s, &args, ssl_do_handshake_intern);
35187           } else {
35188               ret = sc->handshake_func(s);
35189           }
35190       }
35191       return ret;
35192   }
35193   
35194   void SSL_set_accept_state(SSL *s)
35195   {
35196       SSL_CONNECTION *sc = ((s) == 
35197   # 4741 "ssl/ssl_lib.c" 3 4
35198                           ((void *)0) 
35199   # 4741 "ssl/ssl_lib.c"
35200                           ? 
35201   # 4741 "ssl/ssl_lib.c" 3 4
35202                           ((void *)0) 
35203   # 4741 "ssl/ssl_lib.c"
35204                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : 
35205   # 4741 "ssl/ssl_lib.c" 3 4
35206                           ((void *)0)
35207   # 4741 "ssl/ssl_lib.c"
35208                           ));
35209   
35210   
35211       if (((s) != 
35212   # 4744 "ssl/ssl_lib.c" 3 4
35213          ((void *)0) 
35214   # 4744 "ssl/ssl_lib.c"
35215          && ((s)->type == 1 || (s)->type == 2))) {
35216           ossl_quic_set_accept_state(s);
35217           return;
35218       }
35219   
35220   
35221       sc->server = 1;
35222       sc->shutdown = 0;
35223       ossl_statem_clear(sc);
35224       sc->handshake_func = s->method->ssl_accept;
35225   
35226       RECORD_LAYER_reset(&sc->rlayer);
35227   }
35228   
35229   void SSL_set_connect_state(SSL *s)
35230   {
35231       SSL_CONNECTION *sc = ((s) == 
35232   # 4760 "ssl/ssl_lib.c" 3 4
35233                           ((void *)0) 
35234   # 4760 "ssl/ssl_lib.c"
35235                           ? 
35236   # 4760 "ssl/ssl_lib.c" 3 4
35237                           ((void *)0) 
35238   # 4760 "ssl/ssl_lib.c"
35239                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : 
35240   # 4760 "ssl/ssl_lib.c" 3 4
35241                           ((void *)0)
35242   # 4760 "ssl/ssl_lib.c"
35243                           ));
35244   
35245   
35246       if (((s) != 
35247   # 4763 "ssl/ssl_lib.c" 3 4
35248          ((void *)0) 
35249   # 4763 "ssl/ssl_lib.c"
35250          && ((s)->type == 1 || (s)->type == 2))) {
35251           ossl_quic_set_connect_state(s);
35252           return;
35253       }
35254   
35255   
35256       sc->server = 0;
35257       sc->shutdown = 0;
35258       ossl_statem_clear(sc);
35259       sc->handshake_func = s->method->ssl_connect;
35260   
35261       RECORD_LAYER_reset(&sc->rlayer);
35262   }
35263   
35264   int ssl_undefined_function(SSL *s)
35265   {
35266       (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",4779,__func__), ERR_set_error)((20),((257|((0x1 << 18L)|(0x2 << 18L)))),
35267   # 4779 "ssl/ssl_lib.c" 3 4
35268      ((void *)0)
35269   # 4779 "ssl/ssl_lib.c"
35270      );
35271       return 0;
35272   }
35273   
35274   int ssl_undefined_void_function(void)
35275   {
35276       (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",4785,__func__), ERR_set_error)((20),((257|((0x1 << 18L)|(0x2 << 18L)))),
35277   # 4785 "ssl/ssl_lib.c" 3 4
35278      ((void *)0)
35279   # 4785 "ssl/ssl_lib.c"
35280      );
35281       return 0;
35282   }
35283   
35284   int ssl_undefined_const_function(const SSL *s)
35285   {
35286       return 0;
35287   }
35288   
35289   const char *ssl_protocol_to_string(int version)
35290   {
35291       switch (version)
35292       {
35293       case 0x0304:
35294           return "TLSv1.3";
35295   
35296       case 0x0303:
35297           return "TLSv1.2";
35298   
35299       case 0x0302:
35300           return "TLSv1.1";
35301   
35302       case 0x0301:
35303           return "TLSv1";
35304   
35305       case 0x0300:
35306           return "SSLv3";
35307   
35308       case 0x0100:
35309           return "DTLSv0.9";
35310   
35311       case 0xFEFF:
35312           return "DTLSv1";
35313   
35314       case 0xFEFD:
35315           return "DTLSv1.2";
35316   
35317       default:
35318           return "unknown";
35319       }
35320   }
35321   
35322   const char *SSL_get_version(const SSL *s)
35323   {
35324       const SSL_CONNECTION *sc = ((s) == 
35325   # 4829 "ssl/ssl_lib.c" 3 4
35326                                 ((void *)0) 
35327   # 4829 "ssl/ssl_lib.c"
35328                                 ? 
35329   # 4829 "ssl/ssl_lib.c" 3 4
35330                                 ((void *)0) 
35331   # 4829 "ssl/ssl_lib.c"
35332                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
35333   # 4829 "ssl/ssl_lib.c" 3 4
35334                                 ((void *)0)
35335   # 4829 "ssl/ssl_lib.c"
35336                                 )));
35337   
35338   
35339   
35340       if (s->type == 1 || s->type == 2)
35341           return "QUICv1";
35342   
35343   
35344       if (sc == 
35345   # 4837 "ssl/ssl_lib.c" 3 4
35346                ((void *)0)
35347   # 4837 "ssl/ssl_lib.c"
35348                    )
35349           return 
35350   # 4838 "ssl/ssl_lib.c" 3 4
35351                 ((void *)0)
35352   # 4838 "ssl/ssl_lib.c"
35353                     ;
35354   
35355       return ssl_protocol_to_string(sc->version);
35356   }
35357   
35358    int SSL_get_handshake_rtt(const SSL *s, uint64_t *rtt)
35359   {
35360       const SSL_CONNECTION *sc = ((s) == 
35361   # 4845 "ssl/ssl_lib.c" 3 4
35362                                 ((void *)0) 
35363   # 4845 "ssl/ssl_lib.c"
35364                                 ? 
35365   # 4845 "ssl/ssl_lib.c" 3 4
35366                                 ((void *)0) 
35367   # 4845 "ssl/ssl_lib.c"
35368                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
35369   # 4845 "ssl/ssl_lib.c" 3 4
35370                                 ((void *)0)
35371   # 4845 "ssl/ssl_lib.c"
35372                                 )));
35373   
35374       if (sc == 
35375   # 4847 "ssl/ssl_lib.c" 3 4
35376                ((void *)0)
35377   # 4847 "ssl/ssl_lib.c"
35378                    )
35379           return -1;
35380       if (sc->ts_msg_write.t <= 0 || sc->ts_msg_read.t <= 0)
35381           return 0;
35382       if (sc->ts_msg_read.t < sc->ts_msg_write.t)
35383           return -1;
35384   
35385       *rtt = (ossl_time2ticks(ossl_time_subtract(sc->ts_msg_read, sc->ts_msg_write)) / ((((uint64_t)1000000000) / 1000) / 1000));
35386       return 1;
35387   }
35388   
35389   static int dup_ca_names(struct stack_st_X509_NAME **dst, struct stack_st_X509_NAME *src)
35390   {
35391       struct stack_st_X509_NAME *sk;
35392       X509_NAME *xn;
35393       int i;
35394   
35395       if (src == 
35396   # 4864 "ssl/ssl_lib.c" 3 4
35397                 ((void *)0)
35398   # 4864 "ssl/ssl_lib.c"
35399                     ) {
35400           *dst = 
35401   # 4865 "ssl/ssl_lib.c" 3 4
35402                 ((void *)0)
35403   # 4865 "ssl/ssl_lib.c"
35404                     ;
35405           return 1;
35406       }
35407   
35408       if ((sk = ((struct stack_st_X509_NAME *)OPENSSL_sk_new_null())) == 
35409   # 4869 "ssl/ssl_lib.c" 3 4
35410                                            ((void *)0)
35411   # 4869 "ssl/ssl_lib.c"
35412                                                )
35413           return 0;
35414       for (i = 0; i < OPENSSL_sk_num(ossl_check_const_X509_NAME_sk_type(src)); i++) {
35415           xn = X509_NAME_dup(((X509_NAME *)OPENSSL_sk_value(ossl_check_const_X509_NAME_sk_type(src), (i))));
35416           if (xn == 
35417   # 4873 "ssl/ssl_lib.c" 3 4
35418                    ((void *)0)
35419   # 4873 "ssl/ssl_lib.c"
35420                        ) {
35421               OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(sk),ossl_check_X509_NAME_freefunc_type(X509_NAME_free));
35422               return 0;
35423           }
35424           if (OPENSSL_sk_insert(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_type(xn), (i)) == 0) {
35425               X509_NAME_free(xn);
35426               OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(sk),ossl_check_X509_NAME_freefunc_type(X509_NAME_free));
35427               return 0;
35428           }
35429       }
35430       *dst = sk;
35431   
35432       return 1;
35433   }
35434   
35435   SSL *SSL_dup(SSL *s)
35436   {
35437       SSL *ret;
35438       int i;
35439   
35440       SSL_CONNECTION *retsc;
35441       SSL_CONNECTION *sc = ((s) == 
35442   # 4894 "ssl/ssl_lib.c" 3 4
35443                           ((void *)0) 
35444   # 4894 "ssl/ssl_lib.c"
35445                           ? 
35446   # 4894 "ssl/ssl_lib.c" 3 4
35447                           ((void *)0) 
35448   # 4894 "ssl/ssl_lib.c"
35449                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : 
35450   # 4894 "ssl/ssl_lib.c" 3 4
35451                           ((void *)0)
35452   # 4894 "ssl/ssl_lib.c"
35453                           ));
35454   
35455       if (sc == 
35456   # 4896 "ssl/ssl_lib.c" 3 4
35457                ((void *)0)
35458   # 4896 "ssl/ssl_lib.c"
35459                    )
35460           return 
35461   # 4897 "ssl/ssl_lib.c" 3 4
35462                 ((void *)0)
35463   # 4897 "ssl/ssl_lib.c"
35464                     ;
35465   
35466   
35467       if (!SSL_in_init(s) || !SSL_in_before(s)) {
35468           CRYPTO_UP_REF(&s->references, &i);
35469           return s;
35470       }
35471   
35472   
35473   
35474   
35475       if ((ret = SSL_new(SSL_get_SSL_CTX(s))) == 
35476   # 4908 "ssl/ssl_lib.c" 3 4
35477                                                 ((void *)0)
35478   # 4908 "ssl/ssl_lib.c"
35479                                                     )
35480           return 
35481   # 4909 "ssl/ssl_lib.c" 3 4
35482                 ((void *)0)
35483   # 4909 "ssl/ssl_lib.c"
35484                     ;
35485       if ((retsc = ((ret) == 
35486   # 4910 "ssl/ssl_lib.c" 3 4
35487                   ((void *)0) 
35488   # 4910 "ssl/ssl_lib.c"
35489                   ? 
35490   # 4910 "ssl/ssl_lib.c" 3 4
35491                   ((void *)0) 
35492   # 4910 "ssl/ssl_lib.c"
35493                   : ((ret)->type == 0 ? ( SSL_CONNECTION *)(ret) : 
35494   # 4910 "ssl/ssl_lib.c" 3 4
35495                   ((void *)0)
35496   # 4910 "ssl/ssl_lib.c"
35497                   ))) == 
35498   # 4910 "ssl/ssl_lib.c" 3 4
35499                                                         ((void *)0)
35500   # 4910 "ssl/ssl_lib.c"
35501                                                             )
35502           goto err;
35503   
35504       if (sc->session != 
35505   # 4913 "ssl/ssl_lib.c" 3 4
35506                         ((void *)0)
35507   # 4913 "ssl/ssl_lib.c"
35508                             ) {
35509   
35510   
35511   
35512   
35513           if (!SSL_copy_session_id(ret, s))
35514               goto err;
35515       } else {
35516   
35517   
35518   
35519   
35520   
35521   
35522           if (!SSL_set_ssl_method(ret, s->method))
35523               goto err;
35524   
35525           if (sc->cert != 
35526   # 4930 "ssl/ssl_lib.c" 3 4
35527                          ((void *)0)
35528   # 4930 "ssl/ssl_lib.c"
35529                              ) {
35530               ssl_cert_free(retsc->cert);
35531               retsc->cert = ssl_cert_dup(sc->cert);
35532               if (retsc->cert == 
35533   # 4933 "ssl/ssl_lib.c" 3 4
35534                                 ((void *)0)
35535   # 4933 "ssl/ssl_lib.c"
35536                                     )
35537                   goto err;
35538           }
35539   
35540           if (!SSL_set_session_id_context(ret, sc->sid_ctx,
35541                                           (int)sc->sid_ctx_length))
35542               goto err;
35543       }
35544   
35545       if (!ssl_dane_dup(retsc, sc))
35546           goto err;
35547       retsc->version = sc->version;
35548       retsc->options = sc->options;
35549       retsc->min_proto_version = sc->min_proto_version;
35550       retsc->max_proto_version = sc->max_proto_version;
35551       retsc->mode = sc->mode;
35552       SSL_ctrl(ret,51,SSL_ctrl(s,50,0,
35553   # 4949 "ssl/ssl_lib.c" 3 4
35554      ((void *)0)
35555   # 4949 "ssl/ssl_lib.c"
35556      ),
35557   # 4949 "ssl/ssl_lib.c" 3 4
35558      ((void *)0)
35559   # 4949 "ssl/ssl_lib.c"
35560      );
35561       SSL_set_read_ahead(ret, SSL_get_read_ahead(s));
35562       retsc->msg_callback = sc->msg_callback;
35563       retsc->msg_callback_arg = sc->msg_callback_arg;
35564       SSL_set_verify(ret, SSL_get_verify_mode(s), SSL_get_verify_callback(s));
35565       SSL_set_verify_depth(ret, SSL_get_verify_depth(s));
35566       retsc->generate_session_id = sc->generate_session_id;
35567   
35568       SSL_set_info_callback(ret, SSL_get_info_callback(s));
35569   
35570   
35571       if (!CRYPTO_dup_ex_data(0, &ret->ex_data, &s->ex_data))
35572           goto err;
35573   
35574       retsc->server = sc->server;
35575       if (sc->handshake_func) {
35576           if (sc->server)
35577               SSL_set_accept_state(ret);
35578           else
35579               SSL_set_connect_state(ret);
35580       }
35581       retsc->shutdown = sc->shutdown;
35582       retsc->hit = sc->hit;
35583   
35584       retsc->default_passwd_callback = sc->default_passwd_callback;
35585       retsc->default_passwd_callback_userdata = sc->default_passwd_callback_userdata;
35586   
35587       X509_VERIFY_PARAM_inherit(retsc->param, sc->param);
35588   
35589   
35590       if (sc->cipher_list != 
35591   # 4979 "ssl/ssl_lib.c" 3 4
35592                             ((void *)0)
35593   # 4979 "ssl/ssl_lib.c"
35594                                 ) {
35595           if ((retsc->cipher_list = ((struct stack_st_SSL_CIPHER *)OPENSSL_sk_dup(ossl_check_const_SSL_CIPHER_sk_type(sc->cipher_list)))) == 
35596   # 4980 "ssl/ssl_lib.c" 3 4
35597                                                                           ((void *)0)
35598   # 4980 "ssl/ssl_lib.c"
35599                                                                               )
35600               goto err;
35601       }
35602       if (sc->cipher_list_by_id != 
35603   # 4983 "ssl/ssl_lib.c" 3 4
35604                                   ((void *)0)
35605   # 4983 "ssl/ssl_lib.c"
35606                                       )
35607           if ((retsc->cipher_list_by_id = ((struct stack_st_SSL_CIPHER *)OPENSSL_sk_dup(ossl_check_const_SSL_CIPHER_sk_type(sc->cipher_list_by_id))))
35608               == 
35609   # 4985 "ssl/ssl_lib.c" 3 4
35610                 ((void *)0)
35611   # 4985 "ssl/ssl_lib.c"
35612                     )
35613               goto err;
35614   
35615   
35616       if (!dup_ca_names(&retsc->ca_names, sc->ca_names)
35617               || !dup_ca_names(&retsc->client_ca_names, sc->client_ca_names))
35618           goto err;
35619   
35620       return ret;
35621   
35622    err:
35623       SSL_free(ret);
35624       return 
35625   # 4997 "ssl/ssl_lib.c" 3 4
35626             ((void *)0)
35627   # 4997 "ssl/ssl_lib.c"
35628                 ;
35629   }
35630   
35631   X509 *SSL_get_certificate(const SSL *s)
35632   {
35633       SSL_CONNECTION *sc = ((s) == 
35634   # 5002 "ssl/ssl_lib.c" 3 4
35635                           ((void *)0) 
35636   # 5002 "ssl/ssl_lib.c"
35637                           ? 
35638   # 5002 "ssl/ssl_lib.c" 3 4
35639                           ((void *)0) 
35640   # 5002 "ssl/ssl_lib.c"
35641                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
35642   # 5002 "ssl/ssl_lib.c" 3 4
35643                           ((void *)0)
35644   # 5002 "ssl/ssl_lib.c"
35645                           )));
35646   
35647       if (sc == 
35648   # 5004 "ssl/ssl_lib.c" 3 4
35649                ((void *)0)
35650   # 5004 "ssl/ssl_lib.c"
35651                    )
35652           return 
35653   # 5005 "ssl/ssl_lib.c" 3 4
35654                 ((void *)0)
35655   # 5005 "ssl/ssl_lib.c"
35656                     ;
35657   
35658       if (sc->cert != 
35659   # 5007 "ssl/ssl_lib.c" 3 4
35660                      ((void *)0)
35661   # 5007 "ssl/ssl_lib.c"
35662                          )
35663           return sc->cert->key->x509;
35664       else
35665           return 
35666   # 5010 "ssl/ssl_lib.c" 3 4
35667                 ((void *)0)
35668   # 5010 "ssl/ssl_lib.c"
35669                     ;
35670   }
35671   
35672   EVP_PKEY *SSL_get_privatekey(const SSL *s)
35673   {
35674       const SSL_CONNECTION *sc = ((s) == 
35675   # 5015 "ssl/ssl_lib.c" 3 4
35676                                 ((void *)0) 
35677   # 5015 "ssl/ssl_lib.c"
35678                                 ? 
35679   # 5015 "ssl/ssl_lib.c" 3 4
35680                                 ((void *)0) 
35681   # 5015 "ssl/ssl_lib.c"
35682                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
35683   # 5015 "ssl/ssl_lib.c" 3 4
35684                                 ((void *)0)
35685   # 5015 "ssl/ssl_lib.c"
35686                                 )));
35687   
35688       if (sc == 
35689   # 5017 "ssl/ssl_lib.c" 3 4
35690                ((void *)0)
35691   # 5017 "ssl/ssl_lib.c"
35692                    )
35693           return 
35694   # 5018 "ssl/ssl_lib.c" 3 4
35695                 ((void *)0)
35696   # 5018 "ssl/ssl_lib.c"
35697                     ;
35698   
35699       if (sc->cert != 
35700   # 5020 "ssl/ssl_lib.c" 3 4
35701                      ((void *)0)
35702   # 5020 "ssl/ssl_lib.c"
35703                          )
35704           return sc->cert->key->privatekey;
35705       else
35706           return 
35707   # 5023 "ssl/ssl_lib.c" 3 4
35708                 ((void *)0)
35709   # 5023 "ssl/ssl_lib.c"
35710                     ;
35711   }
35712   
35713   X509 *SSL_CTX_get0_certificate(const SSL_CTX *ctx)
35714   {
35715       if (ctx->cert != 
35716   # 5028 "ssl/ssl_lib.c" 3 4
35717                       ((void *)0)
35718   # 5028 "ssl/ssl_lib.c"
35719                           )
35720           return ctx->cert->key->x509;
35721       else
35722           return 
35723   # 5031 "ssl/ssl_lib.c" 3 4
35724                 ((void *)0)
35725   # 5031 "ssl/ssl_lib.c"
35726                     ;
35727   }
35728   
35729   EVP_PKEY *SSL_CTX_get0_privatekey(const SSL_CTX *ctx)
35730   {
35731       if (ctx->cert != 
35732   # 5036 "ssl/ssl_lib.c" 3 4
35733                       ((void *)0)
35734   # 5036 "ssl/ssl_lib.c"
35735                           )
35736           return ctx->cert->key->privatekey;
35737       else
35738           return 
35739   # 5039 "ssl/ssl_lib.c" 3 4
35740                 ((void *)0)
35741   # 5039 "ssl/ssl_lib.c"
35742                     ;
35743   }
35744   
35745   const SSL_CIPHER *SSL_get_current_cipher(const SSL *s)
35746   {
35747       const SSL_CONNECTION *sc = ((s) == 
35748   # 5044 "ssl/ssl_lib.c" 3 4
35749                                 ((void *)0) 
35750   # 5044 "ssl/ssl_lib.c"
35751                                 ? 
35752   # 5044 "ssl/ssl_lib.c" 3 4
35753                                 ((void *)0) 
35754   # 5044 "ssl/ssl_lib.c"
35755                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
35756   # 5044 "ssl/ssl_lib.c" 3 4
35757                                 ((void *)0)
35758   # 5044 "ssl/ssl_lib.c"
35759                                 )));
35760   
35761       if (sc == 
35762   # 5046 "ssl/ssl_lib.c" 3 4
35763                ((void *)0)
35764   # 5046 "ssl/ssl_lib.c"
35765                    )
35766           return 
35767   # 5047 "ssl/ssl_lib.c" 3 4
35768                 ((void *)0)
35769   # 5047 "ssl/ssl_lib.c"
35770                     ;
35771   
35772       if ((sc->session != 
35773   # 5049 "ssl/ssl_lib.c" 3 4
35774                          ((void *)0)
35775   # 5049 "ssl/ssl_lib.c"
35776                              ) && (sc->session->cipher != 
35777   # 5049 "ssl/ssl_lib.c" 3 4
35778                                                           ((void *)0)
35779   # 5049 "ssl/ssl_lib.c"
35780                                                               ))
35781           return sc->session->cipher;
35782       return 
35783   # 5051 "ssl/ssl_lib.c" 3 4
35784             ((void *)0)
35785   # 5051 "ssl/ssl_lib.c"
35786                 ;
35787   }
35788   
35789   const SSL_CIPHER *SSL_get_pending_cipher(const SSL *s)
35790   {
35791       const SSL_CONNECTION *sc = ((s) == 
35792   # 5056 "ssl/ssl_lib.c" 3 4
35793                                 ((void *)0) 
35794   # 5056 "ssl/ssl_lib.c"
35795                                 ? 
35796   # 5056 "ssl/ssl_lib.c" 3 4
35797                                 ((void *)0) 
35798   # 5056 "ssl/ssl_lib.c"
35799                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
35800   # 5056 "ssl/ssl_lib.c" 3 4
35801                                 ((void *)0)
35802   # 5056 "ssl/ssl_lib.c"
35803                                 )));
35804   
35805       if (sc == 
35806   # 5058 "ssl/ssl_lib.c" 3 4
35807                ((void *)0)
35808   # 5058 "ssl/ssl_lib.c"
35809                    )
35810           return 
35811   # 5059 "ssl/ssl_lib.c" 3 4
35812                 ((void *)0)
35813   # 5059 "ssl/ssl_lib.c"
35814                     ;
35815   
35816       return sc->s3.tmp.new_cipher;
35817   }
35818   
35819   const COMP_METHOD *SSL_get_current_compression(const SSL *s)
35820   {
35821   
35822       const SSL_CONNECTION *sc = ((s) == 
35823   # 5067 "ssl/ssl_lib.c" 3 4
35824                                 ((void *)0) 
35825   # 5067 "ssl/ssl_lib.c"
35826                                 ? 
35827   # 5067 "ssl/ssl_lib.c" 3 4
35828                                 ((void *)0) 
35829   # 5067 "ssl/ssl_lib.c"
35830                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : 
35831   # 5067 "ssl/ssl_lib.c" 3 4
35832                                 ((void *)0)
35833   # 5067 "ssl/ssl_lib.c"
35834                                 ));
35835   
35836       if (sc == 
35837   # 5069 "ssl/ssl_lib.c" 3 4
35838                ((void *)0)
35839   # 5069 "ssl/ssl_lib.c"
35840                    )
35841           return 
35842   # 5070 "ssl/ssl_lib.c" 3 4
35843                 ((void *)0)
35844   # 5070 "ssl/ssl_lib.c"
35845                     ;
35846   
35847       return sc->rlayer.wrlmethod->get_compression(sc->rlayer.wrl);
35848   
35849   
35850   
35851   }
35852   
35853   const COMP_METHOD *SSL_get_current_expansion(const SSL *s)
35854   {
35855   
35856       const SSL_CONNECTION *sc = ((s) == 
35857   # 5081 "ssl/ssl_lib.c" 3 4
35858                                 ((void *)0) 
35859   # 5081 "ssl/ssl_lib.c"
35860                                 ? 
35861   # 5081 "ssl/ssl_lib.c" 3 4
35862                                 ((void *)0) 
35863   # 5081 "ssl/ssl_lib.c"
35864                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : 
35865   # 5081 "ssl/ssl_lib.c" 3 4
35866                                 ((void *)0)
35867   # 5081 "ssl/ssl_lib.c"
35868                                 ));
35869   
35870       if (sc == 
35871   # 5083 "ssl/ssl_lib.c" 3 4
35872                ((void *)0)
35873   # 5083 "ssl/ssl_lib.c"
35874                    )
35875           return 
35876   # 5084 "ssl/ssl_lib.c" 3 4
35877                 ((void *)0)
35878   # 5084 "ssl/ssl_lib.c"
35879                     ;
35880   
35881       return sc->rlayer.rrlmethod->get_compression(sc->rlayer.rrl);
35882   
35883   
35884   
35885   }
35886   
35887   int ssl_init_wbio_buffer(SSL_CONNECTION *s)
35888   {
35889       BIO *bbio;
35890   
35891       if (s->bbio != 
35892   # 5096 "ssl/ssl_lib.c" 3 4
35893                     ((void *)0)
35894   # 5096 "ssl/ssl_lib.c"
35895                         ) {
35896   
35897           return 1;
35898       }
35899   
35900       bbio = BIO_new(BIO_f_buffer());
35901       if (bbio == 
35902   # 5102 "ssl/ssl_lib.c" 3 4
35903                  ((void *)0) 
35904   # 5102 "ssl/ssl_lib.c"
35905                       || BIO_int_ctrl(bbio,117,1,0) <= 0) {
35906           BIO_free(bbio);
35907           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",5104,__func__), ERR_set_error)((20),((7 | (0x2 << 18L))),
35908   # 5104 "ssl/ssl_lib.c" 3 4
35909          ((void *)0)
35910   # 5104 "ssl/ssl_lib.c"
35911          );
35912           return 0;
35913       }
35914       s->bbio = bbio;
35915       s->wbio = BIO_push(bbio, s->wbio);
35916   
35917       s->rlayer.wrlmethod->set1_bio(s->rlayer.wrl, s->wbio);
35918   
35919       return 1;
35920   }
35921   
35922   int ssl_free_wbio_buffer(SSL_CONNECTION *s)
35923   {
35924   
35925       if (s->bbio == 
35926   # 5118 "ssl/ssl_lib.c" 3 4
35927                     ((void *)0)
35928   # 5118 "ssl/ssl_lib.c"
35929                         )
35930           return 1;
35931   
35932       s->wbio = BIO_pop(s->wbio);
35933       s->rlayer.wrlmethod->set1_bio(s->rlayer.wrl, s->wbio);
35934   
35935       BIO_free(s->bbio);
35936       s->bbio = 
35937   # 5125 "ssl/ssl_lib.c" 3 4
35938                ((void *)0)
35939   # 5125 "ssl/ssl_lib.c"
35940                    ;
35941   
35942       return 1;
35943   }
35944   
35945   void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode)
35946   {
35947       ctx->quiet_shutdown = mode;
35948   }
35949   
35950   int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx)
35951   {
35952       return ctx->quiet_shutdown;
35953   }
35954   
35955   void SSL_set_quiet_shutdown(SSL *s, int mode)
35956   {
35957       SSL_CONNECTION *sc = ((s) == 
35958   # 5142 "ssl/ssl_lib.c" 3 4
35959                           ((void *)0) 
35960   # 5142 "ssl/ssl_lib.c"
35961                           ? 
35962   # 5142 "ssl/ssl_lib.c" 3 4
35963                           ((void *)0) 
35964   # 5142 "ssl/ssl_lib.c"
35965                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : 
35966   # 5142 "ssl/ssl_lib.c" 3 4
35967                           ((void *)0)
35968   # 5142 "ssl/ssl_lib.c"
35969                           ));
35970   
35971   
35972       if (sc == 
35973   # 5145 "ssl/ssl_lib.c" 3 4
35974                ((void *)0)
35975   # 5145 "ssl/ssl_lib.c"
35976                    )
35977           return;
35978   
35979       sc->quiet_shutdown = mode;
35980   }
35981   
35982   int SSL_get_quiet_shutdown(const SSL *s)
35983   {
35984       const SSL_CONNECTION *sc = ((s) == 
35985   # 5153 "ssl/ssl_lib.c" 3 4
35986                                 ((void *)0) 
35987   # 5153 "ssl/ssl_lib.c"
35988                                 ? 
35989   # 5153 "ssl/ssl_lib.c" 3 4
35990                                 ((void *)0) 
35991   # 5153 "ssl/ssl_lib.c"
35992                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : 
35993   # 5153 "ssl/ssl_lib.c" 3 4
35994                                 ((void *)0)
35995   # 5153 "ssl/ssl_lib.c"
35996                                 ));
35997   
35998   
35999       if (sc == 
36000   # 5156 "ssl/ssl_lib.c" 3 4
36001                ((void *)0)
36002   # 5156 "ssl/ssl_lib.c"
36003                    )
36004           return 0;
36005   
36006       return sc->quiet_shutdown;
36007   }
36008   
36009   void SSL_set_shutdown(SSL *s, int mode)
36010   {
36011       SSL_CONNECTION *sc = ((s) == 
36012   # 5164 "ssl/ssl_lib.c" 3 4
36013                           ((void *)0) 
36014   # 5164 "ssl/ssl_lib.c"
36015                           ? 
36016   # 5164 "ssl/ssl_lib.c" 3 4
36017                           ((void *)0) 
36018   # 5164 "ssl/ssl_lib.c"
36019                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : 
36020   # 5164 "ssl/ssl_lib.c" 3 4
36021                           ((void *)0)
36022   # 5164 "ssl/ssl_lib.c"
36023                           ));
36024   
36025   
36026       if (sc == 
36027   # 5167 "ssl/ssl_lib.c" 3 4
36028                ((void *)0)
36029   # 5167 "ssl/ssl_lib.c"
36030                    )
36031           return;
36032   
36033       sc->shutdown = mode;
36034   }
36035   
36036   int SSL_get_shutdown(const SSL *s)
36037   {
36038       const SSL_CONNECTION *sc = ((s) == 
36039   # 5175 "ssl/ssl_lib.c" 3 4
36040                                 ((void *)0) 
36041   # 5175 "ssl/ssl_lib.c"
36042                                 ? 
36043   # 5175 "ssl/ssl_lib.c" 3 4
36044                                 ((void *)0) 
36045   # 5175 "ssl/ssl_lib.c"
36046                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : 
36047   # 5175 "ssl/ssl_lib.c" 3 4
36048                                 ((void *)0)
36049   # 5175 "ssl/ssl_lib.c"
36050                                 ));
36051   
36052   
36053   
36054       if (((s) != 
36055   # 5179 "ssl/ssl_lib.c" 3 4
36056          ((void *)0) 
36057   # 5179 "ssl/ssl_lib.c"
36058          && ((s)->type == 1 || (s)->type == 2)))
36059           return ossl_quic_get_shutdown(s);
36060   
36061   
36062       if (sc == 
36063   # 5183 "ssl/ssl_lib.c" 3 4
36064                ((void *)0)
36065   # 5183 "ssl/ssl_lib.c"
36066                    )
36067           return 0;
36068   
36069       return sc->shutdown;
36070   }
36071   
36072   int SSL_version(const SSL *s)
36073   {
36074       const SSL_CONNECTION *sc = ((s) == 
36075   # 5191 "ssl/ssl_lib.c" 3 4
36076                                 ((void *)0) 
36077   # 5191 "ssl/ssl_lib.c"
36078                                 ? 
36079   # 5191 "ssl/ssl_lib.c" 3 4
36080                                 ((void *)0) 
36081   # 5191 "ssl/ssl_lib.c"
36082                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
36083   # 5191 "ssl/ssl_lib.c" 3 4
36084                                 ((void *)0)
36085   # 5191 "ssl/ssl_lib.c"
36086                                 )));
36087   
36088   
36089   
36090       if (s->type == 1 || s->type == 2)
36091           return 0x0000001;
36092   
36093       if (sc == 
36094   # 5198 "ssl/ssl_lib.c" 3 4
36095                ((void *)0)
36096   # 5198 "ssl/ssl_lib.c"
36097                    )
36098           return 0;
36099   
36100       return sc->version;
36101   }
36102   
36103   int SSL_client_version(const SSL *s)
36104   {
36105       const SSL_CONNECTION *sc = ((s) == 
36106   # 5206 "ssl/ssl_lib.c" 3 4
36107                                 ((void *)0) 
36108   # 5206 "ssl/ssl_lib.c"
36109                                 ? 
36110   # 5206 "ssl/ssl_lib.c" 3 4
36111                                 ((void *)0) 
36112   # 5206 "ssl/ssl_lib.c"
36113                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
36114   # 5206 "ssl/ssl_lib.c" 3 4
36115                                 ((void *)0)
36116   # 5206 "ssl/ssl_lib.c"
36117                                 )));
36118   
36119   
36120   
36121       if (s->type == 1 || s->type == 2)
36122           return 0x0000001;
36123   
36124       if (sc == 
36125   # 5213 "ssl/ssl_lib.c" 3 4
36126                ((void *)0)
36127   # 5213 "ssl/ssl_lib.c"
36128                    )
36129           return 0;
36130   
36131       return sc->client_version;
36132   }
36133   
36134   SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl)
36135   {
36136       return ssl->ctx;
36137   }
36138   
36139   SSL_CTX *SSL_set_SSL_CTX(SSL *ssl, SSL_CTX *ctx)
36140   {
36141       CERT *new_cert;
36142       SSL_CONNECTION *sc = ((ssl) == 
36143   # 5227 "ssl/ssl_lib.c" 3 4
36144                           ((void *)0) 
36145   # 5227 "ssl/ssl_lib.c"
36146                           ? 
36147   # 5227 "ssl/ssl_lib.c" 3 4
36148                           ((void *)0) 
36149   # 5227 "ssl/ssl_lib.c"
36150                           : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : 
36151   # 5227 "ssl/ssl_lib.c" 3 4
36152                           ((void *)0)
36153   # 5227 "ssl/ssl_lib.c"
36154                           ));
36155   
36156   
36157       if (sc == 
36158   # 5230 "ssl/ssl_lib.c" 3 4
36159                ((void *)0)
36160   # 5230 "ssl/ssl_lib.c"
36161                    )
36162           return 
36163   # 5231 "ssl/ssl_lib.c" 3 4
36164                 ((void *)0)
36165   # 5231 "ssl/ssl_lib.c"
36166                     ;
36167   
36168       if (ssl->ctx == ctx)
36169           return ssl->ctx;
36170       if (ctx == 
36171   # 5235 "ssl/ssl_lib.c" 3 4
36172                 ((void *)0)
36173   # 5235 "ssl/ssl_lib.c"
36174                     )
36175           ctx = sc->session_ctx;
36176       new_cert = ssl_cert_dup(ctx->cert);
36177       if (new_cert == 
36178   # 5238 "ssl/ssl_lib.c" 3 4
36179                      ((void *)0)
36180   # 5238 "ssl/ssl_lib.c"
36181                          ) {
36182           return 
36183   # 5239 "ssl/ssl_lib.c" 3 4
36184                 ((void *)0)
36185   # 5239 "ssl/ssl_lib.c"
36186                     ;
36187       }
36188   
36189       if (!custom_exts_copy_flags(&new_cert->custext, &sc->cert->custext)) {
36190           ssl_cert_free(new_cert);
36191           return 
36192   # 5244 "ssl/ssl_lib.c" 3 4
36193                 ((void *)0)
36194   # 5244 "ssl/ssl_lib.c"
36195                     ;
36196       }
36197   
36198       ssl_cert_free(sc->cert);
36199       sc->cert = new_cert;
36200   
36201   
36202   
36203   
36204   
36205       if (!__builtin_expect(!!((sc->sid_ctx_length <= sizeof(sc->sid_ctx)) != 0), 1))
36206           return 
36207   # 5255 "ssl/ssl_lib.c" 3 4
36208                 ((void *)0)
36209   # 5255 "ssl/ssl_lib.c"
36210                     ;
36211   
36212   
36213   
36214   
36215   
36216   
36217   
36218       if ((ssl->ctx != 
36219   # 5263 "ssl/ssl_lib.c" 3 4
36220                       ((void *)0)
36221   # 5263 "ssl/ssl_lib.c"
36222                           ) &&
36223           (sc->sid_ctx_length == ssl->ctx->sid_ctx_length) &&
36224           (memcmp(sc->sid_ctx, ssl->ctx->sid_ctx, sc->sid_ctx_length) == 0)) {
36225           sc->sid_ctx_length = ctx->sid_ctx_length;
36226           memcpy(&sc->sid_ctx, &ctx->sid_ctx, sizeof(sc->sid_ctx));
36227       }
36228   
36229       SSL_CTX_up_ref(ctx);
36230       SSL_CTX_free(ssl->ctx);
36231       ssl->ctx = ctx;
36232   
36233       return ssl->ctx;
36234   }
36235   
36236   int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx)
36237   {
36238       return X509_STORE_set_default_paths_ex(ctx->cert_store, ctx->libctx,
36239                                              ctx->propq);
36240   }
36241   
36242   int SSL_CTX_set_default_verify_dir(SSL_CTX *ctx)
36243   {
36244       X509_LOOKUP *lookup;
36245   
36246       lookup = X509_STORE_add_lookup(ctx->cert_store, X509_LOOKUP_hash_dir());
36247       if (lookup == 
36248   # 5288 "ssl/ssl_lib.c" 3 4
36249                    ((void *)0)
36250   # 5288 "ssl/ssl_lib.c"
36251                        )
36252           return 0;
36253   
36254   
36255       ERR_set_mark();
36256   
36257       X509_LOOKUP_ctrl((lookup),2,(
36258   # 5294 "ssl/ssl_lib.c" 3 4
36259      ((void *)0)
36260   # 5294 "ssl/ssl_lib.c"
36261      ),(long)(3),
36262   # 5294 "ssl/ssl_lib.c" 3 4
36263      ((void *)0)
36264   # 5294 "ssl/ssl_lib.c"
36265      );
36266   
36267       ERR_pop_to_mark();
36268   
36269       return 1;
36270   }
36271   
36272   int SSL_CTX_set_default_verify_file(SSL_CTX *ctx)
36273   {
36274       X509_LOOKUP *lookup;
36275   
36276       lookup = X509_STORE_add_lookup(ctx->cert_store, X509_LOOKUP_file());
36277       if (lookup == 
36278   # 5306 "ssl/ssl_lib.c" 3 4
36279                    ((void *)0)
36280   # 5306 "ssl/ssl_lib.c"
36281                        )
36282           return 0;
36283   
36284   
36285       ERR_set_mark();
36286   
36287       X509_LOOKUP_ctrl_ex((lookup), 1, (
36288   # 5312 "ssl/ssl_lib.c" 3 4
36289      ((void *)0)
36290   # 5312 "ssl/ssl_lib.c"
36291      ), (long)(3), 
36292   # 5312 "ssl/ssl_lib.c" 3 4
36293      ((void *)0)
36294   # 5312 "ssl/ssl_lib.c"
36295      , (ctx->libctx), (ctx->propq))
36296                                           ;
36297   
36298       ERR_pop_to_mark();
36299   
36300       return 1;
36301   }
36302   
36303   int SSL_CTX_set_default_verify_store(SSL_CTX *ctx)
36304   {
36305       X509_LOOKUP *lookup;
36306   
36307       lookup = X509_STORE_add_lookup(ctx->cert_store, X509_LOOKUP_store());
36308       if (lookup == 
36309   # 5325 "ssl/ssl_lib.c" 3 4
36310                    ((void *)0)
36311   # 5325 "ssl/ssl_lib.c"
36312                        )
36313           return 0;
36314   
36315   
36316       ERR_set_mark();
36317   
36318       X509_LOOKUP_ctrl_ex((lookup), 3, (
36319   # 5331 "ssl/ssl_lib.c" 3 4
36320      ((void *)0)
36321   # 5331 "ssl/ssl_lib.c"
36322      ), 0, 
36323   # 5331 "ssl/ssl_lib.c" 3 4
36324      ((void *)0)
36325   # 5331 "ssl/ssl_lib.c"
36326      , (ctx->libctx), (ctx->propq));
36327   
36328       ERR_pop_to_mark();
36329   
36330       return 1;
36331   }
36332   
36333   int SSL_CTX_load_verify_file(SSL_CTX *ctx, const char *CAfile)
36334   {
36335       return X509_STORE_load_file_ex(ctx->cert_store, CAfile, ctx->libctx,
36336                                      ctx->propq);
36337   }
36338   
36339   int SSL_CTX_load_verify_dir(SSL_CTX *ctx, const char *CApath)
36340   {
36341       return X509_STORE_load_path(ctx->cert_store, CApath);
36342   }
36343   
36344   int SSL_CTX_load_verify_store(SSL_CTX *ctx, const char *CAstore)
36345   {
36346       return X509_STORE_load_store_ex(ctx->cert_store, CAstore, ctx->libctx,
36347                                       ctx->propq);
36348   }
36349   
36350   int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile,
36351                                     const char *CApath)
36352   {
36353       if (CAfile == 
36354   # 5358 "ssl/ssl_lib.c" 3 4
36355                    ((void *)0) 
36356   # 5358 "ssl/ssl_lib.c"
36357                         && CApath == 
36358   # 5358 "ssl/ssl_lib.c" 3 4
36359                                      ((void *)0)
36360   # 5358 "ssl/ssl_lib.c"
36361                                          )
36362           return 0;
36363       if (CAfile != 
36364   # 5360 "ssl/ssl_lib.c" 3 4
36365                    ((void *)0) 
36366   # 5360 "ssl/ssl_lib.c"
36367                         && !SSL_CTX_load_verify_file(ctx, CAfile))
36368           return 0;
36369       if (CApath != 
36370   # 5362 "ssl/ssl_lib.c" 3 4
36371                    ((void *)0) 
36372   # 5362 "ssl/ssl_lib.c"
36373                         && !SSL_CTX_load_verify_dir(ctx, CApath))
36374           return 0;
36375       return 1;
36376   }
36377   
36378   void SSL_set_info_callback(SSL *ssl,
36379                              void (*cb) (const SSL *ssl, int type, int val))
36380   {
36381       SSL_CONNECTION *sc = ((ssl) == 
36382   # 5370 "ssl/ssl_lib.c" 3 4
36383                           ((void *)0) 
36384   # 5370 "ssl/ssl_lib.c"
36385                           ? 
36386   # 5370 "ssl/ssl_lib.c" 3 4
36387                           ((void *)0) 
36388   # 5370 "ssl/ssl_lib.c"
36389                           : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls : 
36390   # 5370 "ssl/ssl_lib.c" 3 4
36391                           ((void *)0)
36392   # 5370 "ssl/ssl_lib.c"
36393                           )));
36394   
36395       if (sc == 
36396   # 5372 "ssl/ssl_lib.c" 3 4
36397                ((void *)0)
36398   # 5372 "ssl/ssl_lib.c"
36399                    )
36400           return;
36401   
36402       sc->info_callback = cb;
36403   }
36404   
36405   
36406   
36407   
36408   
36409   void (*SSL_get_info_callback(const SSL *ssl)) (const SSL * ,
36410                                                  int ,
36411                                                  int ) {
36412       const SSL_CONNECTION *sc = ((ssl) == 
36413   # 5385 "ssl/ssl_lib.c" 3 4
36414                                 ((void *)0) 
36415   # 5385 "ssl/ssl_lib.c"
36416                                 ? 
36417   # 5385 "ssl/ssl_lib.c" 3 4
36418                                 ((void *)0) 
36419   # 5385 "ssl/ssl_lib.c"
36420                                 : ((ssl)->type == 0 ? (const SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(ssl))->tls : 
36421   # 5385 "ssl/ssl_lib.c" 3 4
36422                                 ((void *)0)
36423   # 5385 "ssl/ssl_lib.c"
36424                                 )));
36425   
36426       if (sc == 
36427   # 5387 "ssl/ssl_lib.c" 3 4
36428                ((void *)0)
36429   # 5387 "ssl/ssl_lib.c"
36430                    )
36431           return 
36432   # 5388 "ssl/ssl_lib.c" 3 4
36433                 ((void *)0)
36434   # 5388 "ssl/ssl_lib.c"
36435                     ;
36436   
36437       return sc->info_callback;
36438   }
36439   
36440   void SSL_set_verify_result(SSL *ssl, long arg)
36441   {
36442       SSL_CONNECTION *sc = ((ssl) == 
36443   # 5395 "ssl/ssl_lib.c" 3 4
36444                           ((void *)0) 
36445   # 5395 "ssl/ssl_lib.c"
36446                           ? 
36447   # 5395 "ssl/ssl_lib.c" 3 4
36448                           ((void *)0) 
36449   # 5395 "ssl/ssl_lib.c"
36450                           : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls : 
36451   # 5395 "ssl/ssl_lib.c" 3 4
36452                           ((void *)0)
36453   # 5395 "ssl/ssl_lib.c"
36454                           )));
36455   
36456       if (sc == 
36457   # 5397 "ssl/ssl_lib.c" 3 4
36458                ((void *)0)
36459   # 5397 "ssl/ssl_lib.c"
36460                    )
36461           return;
36462   
36463       sc->verify_result = arg;
36464   }
36465   
36466   long SSL_get_verify_result(const SSL *ssl)
36467   {
36468       const SSL_CONNECTION *sc = ((ssl) == 
36469   # 5405 "ssl/ssl_lib.c" 3 4
36470                                 ((void *)0) 
36471   # 5405 "ssl/ssl_lib.c"
36472                                 ? 
36473   # 5405 "ssl/ssl_lib.c" 3 4
36474                                 ((void *)0) 
36475   # 5405 "ssl/ssl_lib.c"
36476                                 : ((ssl)->type == 0 ? (const SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(ssl))->tls : 
36477   # 5405 "ssl/ssl_lib.c" 3 4
36478                                 ((void *)0)
36479   # 5405 "ssl/ssl_lib.c"
36480                                 )));
36481   
36482       if (sc == 
36483   # 5407 "ssl/ssl_lib.c" 3 4
36484                ((void *)0)
36485   # 5407 "ssl/ssl_lib.c"
36486                    )
36487           return 0;
36488   
36489       return sc->verify_result;
36490   }
36491   
36492   size_t SSL_get_client_random(const SSL *ssl, unsigned char *out, size_t outlen)
36493   {
36494       const SSL_CONNECTION *sc = ((ssl) == 
36495   # 5415 "ssl/ssl_lib.c" 3 4
36496                                 ((void *)0) 
36497   # 5415 "ssl/ssl_lib.c"
36498                                 ? 
36499   # 5415 "ssl/ssl_lib.c" 3 4
36500                                 ((void *)0) 
36501   # 5415 "ssl/ssl_lib.c"
36502                                 : ((ssl)->type == 0 ? (const SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(ssl))->tls : 
36503   # 5415 "ssl/ssl_lib.c" 3 4
36504                                 ((void *)0)
36505   # 5415 "ssl/ssl_lib.c"
36506                                 )));
36507   
36508       if (sc == 
36509   # 5417 "ssl/ssl_lib.c" 3 4
36510                ((void *)0)
36511   # 5417 "ssl/ssl_lib.c"
36512                    )
36513           return 0;
36514   
36515       if (outlen == 0)
36516           return sizeof(sc->s3.client_random);
36517       if (outlen > sizeof(sc->s3.client_random))
36518           outlen = sizeof(sc->s3.client_random);
36519       memcpy(out, sc->s3.client_random, outlen);
36520       return outlen;
36521   }
36522   
36523   size_t SSL_get_server_random(const SSL *ssl, unsigned char *out, size_t outlen)
36524   {
36525       const SSL_CONNECTION *sc = ((ssl) == 
36526   # 5430 "ssl/ssl_lib.c" 3 4
36527                                 ((void *)0) 
36528   # 5430 "ssl/ssl_lib.c"
36529                                 ? 
36530   # 5430 "ssl/ssl_lib.c" 3 4
36531                                 ((void *)0) 
36532   # 5430 "ssl/ssl_lib.c"
36533                                 : ((ssl)->type == 0 ? (const SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(ssl))->tls : 
36534   # 5430 "ssl/ssl_lib.c" 3 4
36535                                 ((void *)0)
36536   # 5430 "ssl/ssl_lib.c"
36537                                 )));
36538   
36539       if (sc == 
36540   # 5432 "ssl/ssl_lib.c" 3 4
36541                ((void *)0)
36542   # 5432 "ssl/ssl_lib.c"
36543                    )
36544           return 0;
36545   
36546       if (outlen == 0)
36547           return sizeof(sc->s3.server_random);
36548       if (outlen > sizeof(sc->s3.server_random))
36549           outlen = sizeof(sc->s3.server_random);
36550       memcpy(out, sc->s3.server_random, outlen);
36551       return outlen;
36552   }
36553   
36554   size_t SSL_SESSION_get_master_key(const SSL_SESSION *session,
36555                                     unsigned char *out, size_t outlen)
36556   {
36557       if (outlen == 0)
36558           return session->master_key_length;
36559       if (outlen > session->master_key_length)
36560           outlen = session->master_key_length;
36561       memcpy(out, session->master_key, outlen);
36562       return outlen;
36563   }
36564   
36565   int SSL_SESSION_set1_master_key(SSL_SESSION *sess, const unsigned char *in,
36566                                   size_t len)
36567   {
36568       if (len > sizeof(sess->master_key))
36569           return 0;
36570   
36571       memcpy(sess->master_key, in, len);
36572       sess->master_key_length = len;
36573       return 1;
36574   }
36575   
36576   
36577   int SSL_set_ex_data(SSL *s, int idx, void *arg)
36578   {
36579       return CRYPTO_set_ex_data(&s->ex_data, idx, arg);
36580   }
36581   
36582   void *SSL_get_ex_data(const SSL *s, int idx)
36583   {
36584       return CRYPTO_get_ex_data(&s->ex_data, idx);
36585   }
36586   
36587   int SSL_CTX_set_ex_data(SSL_CTX *s, int idx, void *arg)
36588   {
36589       return CRYPTO_set_ex_data(&s->ex_data, idx, arg);
36590   }
36591   
36592   void *SSL_CTX_get_ex_data(const SSL_CTX *s, int idx)
36593   {
36594       return CRYPTO_get_ex_data(&s->ex_data, idx);
36595   }
36596   
36597   X509_STORE *SSL_CTX_get_cert_store(const SSL_CTX *ctx)
36598   {
36599       return ctx->cert_store;
36600   }
36601   
36602   void SSL_CTX_set_cert_store(SSL_CTX *ctx, X509_STORE *store)
36603   {
36604       X509_STORE_free(ctx->cert_store);
36605       ctx->cert_store = store;
36606   }
36607   
36608   void SSL_CTX_set1_cert_store(SSL_CTX *ctx, X509_STORE *store)
36609   {
36610       if (store != 
36611   # 5499 "ssl/ssl_lib.c" 3 4
36612                   ((void *)0)
36613   # 5499 "ssl/ssl_lib.c"
36614                       )
36615           X509_STORE_up_ref(store);
36616       SSL_CTX_set_cert_store(ctx, store);
36617   }
36618   
36619   int SSL_want(const SSL *s)
36620   {
36621       const SSL_CONNECTION *sc = ((s) == 
36622   # 5506 "ssl/ssl_lib.c" 3 4
36623                                 ((void *)0) 
36624   # 5506 "ssl/ssl_lib.c"
36625                                 ? 
36626   # 5506 "ssl/ssl_lib.c" 3 4
36627                                 ((void *)0) 
36628   # 5506 "ssl/ssl_lib.c"
36629                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
36630   # 5506 "ssl/ssl_lib.c" 3 4
36631                                 ((void *)0)
36632   # 5506 "ssl/ssl_lib.c"
36633                                 )));
36634   
36635   
36636       if (((s) != 
36637   # 5509 "ssl/ssl_lib.c" 3 4
36638          ((void *)0) 
36639   # 5509 "ssl/ssl_lib.c"
36640          && ((s)->type == 1 || (s)->type == 2)))
36641           return ossl_quic_want(s);
36642   
36643   
36644       if (sc == 
36645   # 5513 "ssl/ssl_lib.c" 3 4
36646                ((void *)0)
36647   # 5513 "ssl/ssl_lib.c"
36648                    )
36649           return 1;
36650   
36651       return sc->rwstate;
36652   }
36653   
36654   
36655   int SSL_CTX_use_psk_identity_hint(SSL_CTX *ctx, const char *identity_hint)
36656   {
36657       if (identity_hint != 
36658   # 5522 "ssl/ssl_lib.c" 3 4
36659                           ((void *)0) 
36660   # 5522 "ssl/ssl_lib.c"
36661                                && strlen(identity_hint) > 256) {
36662           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",5523,__func__), ERR_set_error)((20),(146),
36663   # 5523 "ssl/ssl_lib.c" 3 4
36664          ((void *)0)
36665   # 5523 "ssl/ssl_lib.c"
36666          );
36667           return 0;
36668       }
36669       CRYPTO_free(ctx->cert->psk_identity_hint, "ssl/ssl_lib.c", 5526);
36670       if (identity_hint != 
36671   # 5527 "ssl/ssl_lib.c" 3 4
36672                           ((void *)0)
36673   # 5527 "ssl/ssl_lib.c"
36674                               ) {
36675           ctx->cert->psk_identity_hint = CRYPTO_strdup(identity_hint, "ssl/ssl_lib.c", 5528);
36676           if (ctx->cert->psk_identity_hint == 
36677   # 5529 "ssl/ssl_lib.c" 3 4
36678                                              ((void *)0)
36679   # 5529 "ssl/ssl_lib.c"
36680                                                  )
36681               return 0;
36682       } else
36683           ctx->cert->psk_identity_hint = 
36684   # 5532 "ssl/ssl_lib.c" 3 4
36685                                         ((void *)0)
36686   # 5532 "ssl/ssl_lib.c"
36687                                             ;
36688       return 1;
36689   }
36690   
36691   int SSL_use_psk_identity_hint(SSL *s, const char *identity_hint)
36692   {
36693       SSL_CONNECTION *sc = ((s) == 
36694   # 5538 "ssl/ssl_lib.c" 3 4
36695                           ((void *)0) 
36696   # 5538 "ssl/ssl_lib.c"
36697                           ? 
36698   # 5538 "ssl/ssl_lib.c" 3 4
36699                           ((void *)0) 
36700   # 5538 "ssl/ssl_lib.c"
36701                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
36702   # 5538 "ssl/ssl_lib.c" 3 4
36703                           ((void *)0)
36704   # 5538 "ssl/ssl_lib.c"
36705                           )));
36706   
36707       if (sc == 
36708   # 5540 "ssl/ssl_lib.c" 3 4
36709                ((void *)0)
36710   # 5540 "ssl/ssl_lib.c"
36711                    )
36712           return 0;
36713   
36714       if (identity_hint != 
36715   # 5543 "ssl/ssl_lib.c" 3 4
36716                           ((void *)0) 
36717   # 5543 "ssl/ssl_lib.c"
36718                                && strlen(identity_hint) > 256) {
36719           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",5544,__func__), ERR_set_error)((20),(146),
36720   # 5544 "ssl/ssl_lib.c" 3 4
36721          ((void *)0)
36722   # 5544 "ssl/ssl_lib.c"
36723          );
36724           return 0;
36725       }
36726       CRYPTO_free(sc->cert->psk_identity_hint, "ssl/ssl_lib.c", 5547);
36727       if (identity_hint != 
36728   # 5548 "ssl/ssl_lib.c" 3 4
36729                           ((void *)0)
36730   # 5548 "ssl/ssl_lib.c"
36731                               ) {
36732           sc->cert->psk_identity_hint = CRYPTO_strdup(identity_hint, "ssl/ssl_lib.c", 5549);
36733           if (sc->cert->psk_identity_hint == 
36734   # 5550 "ssl/ssl_lib.c" 3 4
36735                                             ((void *)0)
36736   # 5550 "ssl/ssl_lib.c"
36737                                                 )
36738               return 0;
36739       } else
36740           sc->cert->psk_identity_hint = 
36741   # 5553 "ssl/ssl_lib.c" 3 4
36742                                        ((void *)0)
36743   # 5553 "ssl/ssl_lib.c"
36744                                            ;
36745       return 1;
36746   }
36747   
36748   const char *SSL_get_psk_identity_hint(const SSL *s)
36749   {
36750       const SSL_CONNECTION *sc = ((s) == 
36751   # 5559 "ssl/ssl_lib.c" 3 4
36752                                 ((void *)0) 
36753   # 5559 "ssl/ssl_lib.c"
36754                                 ? 
36755   # 5559 "ssl/ssl_lib.c" 3 4
36756                                 ((void *)0) 
36757   # 5559 "ssl/ssl_lib.c"
36758                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
36759   # 5559 "ssl/ssl_lib.c" 3 4
36760                                 ((void *)0)
36761   # 5559 "ssl/ssl_lib.c"
36762                                 )));
36763   
36764       if (sc == 
36765   # 5561 "ssl/ssl_lib.c" 3 4
36766                ((void *)0) 
36767   # 5561 "ssl/ssl_lib.c"
36768                     || sc->session == 
36769   # 5561 "ssl/ssl_lib.c" 3 4
36770                                       ((void *)0)
36771   # 5561 "ssl/ssl_lib.c"
36772                                           )
36773           return 
36774   # 5562 "ssl/ssl_lib.c" 3 4
36775                 ((void *)0)
36776   # 5562 "ssl/ssl_lib.c"
36777                     ;
36778   
36779       return sc->session->psk_identity_hint;
36780   }
36781   
36782   const char *SSL_get_psk_identity(const SSL *s)
36783   {
36784       const SSL_CONNECTION *sc = ((s) == 
36785   # 5569 "ssl/ssl_lib.c" 3 4
36786                                 ((void *)0) 
36787   # 5569 "ssl/ssl_lib.c"
36788                                 ? 
36789   # 5569 "ssl/ssl_lib.c" 3 4
36790                                 ((void *)0) 
36791   # 5569 "ssl/ssl_lib.c"
36792                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
36793   # 5569 "ssl/ssl_lib.c" 3 4
36794                                 ((void *)0)
36795   # 5569 "ssl/ssl_lib.c"
36796                                 )));
36797   
36798       if (sc == 
36799   # 5571 "ssl/ssl_lib.c" 3 4
36800                ((void *)0) 
36801   # 5571 "ssl/ssl_lib.c"
36802                     || sc->session == 
36803   # 5571 "ssl/ssl_lib.c" 3 4
36804                                       ((void *)0)
36805   # 5571 "ssl/ssl_lib.c"
36806                                           )
36807           return 
36808   # 5572 "ssl/ssl_lib.c" 3 4
36809                 ((void *)0)
36810   # 5572 "ssl/ssl_lib.c"
36811                     ;
36812   
36813       return sc->session->psk_identity;
36814   }
36815   
36816   void SSL_set_psk_client_callback(SSL *s, SSL_psk_client_cb_func cb)
36817   {
36818       SSL_CONNECTION *sc = ((s) == 
36819   # 5579 "ssl/ssl_lib.c" 3 4
36820                           ((void *)0) 
36821   # 5579 "ssl/ssl_lib.c"
36822                           ? 
36823   # 5579 "ssl/ssl_lib.c" 3 4
36824                           ((void *)0) 
36825   # 5579 "ssl/ssl_lib.c"
36826                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
36827   # 5579 "ssl/ssl_lib.c" 3 4
36828                           ((void *)0)
36829   # 5579 "ssl/ssl_lib.c"
36830                           )));
36831   
36832       if (sc == 
36833   # 5581 "ssl/ssl_lib.c" 3 4
36834                ((void *)0)
36835   # 5581 "ssl/ssl_lib.c"
36836                    )
36837           return;
36838   
36839       sc->psk_client_callback = cb;
36840   }
36841   
36842   void SSL_CTX_set_psk_client_callback(SSL_CTX *ctx, SSL_psk_client_cb_func cb)
36843   {
36844       ctx->psk_client_callback = cb;
36845   }
36846   
36847   void SSL_set_psk_server_callback(SSL *s, SSL_psk_server_cb_func cb)
36848   {
36849       SSL_CONNECTION *sc = ((s) == 
36850   # 5594 "ssl/ssl_lib.c" 3 4
36851                           ((void *)0) 
36852   # 5594 "ssl/ssl_lib.c"
36853                           ? 
36854   # 5594 "ssl/ssl_lib.c" 3 4
36855                           ((void *)0) 
36856   # 5594 "ssl/ssl_lib.c"
36857                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
36858   # 5594 "ssl/ssl_lib.c" 3 4
36859                           ((void *)0)
36860   # 5594 "ssl/ssl_lib.c"
36861                           )));
36862   
36863       if (sc == 
36864   # 5596 "ssl/ssl_lib.c" 3 4
36865                ((void *)0)
36866   # 5596 "ssl/ssl_lib.c"
36867                    )
36868           return;
36869   
36870       sc->psk_server_callback = cb;
36871   }
36872   
36873   void SSL_CTX_set_psk_server_callback(SSL_CTX *ctx, SSL_psk_server_cb_func cb)
36874   {
36875       ctx->psk_server_callback = cb;
36876   }
36877   
36878   
36879   void SSL_set_psk_find_session_callback(SSL *s, SSL_psk_find_session_cb_func cb)
36880   {
36881       SSL_CONNECTION *sc = ((s) == 
36882   # 5610 "ssl/ssl_lib.c" 3 4
36883                           ((void *)0) 
36884   # 5610 "ssl/ssl_lib.c"
36885                           ? 
36886   # 5610 "ssl/ssl_lib.c" 3 4
36887                           ((void *)0) 
36888   # 5610 "ssl/ssl_lib.c"
36889                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
36890   # 5610 "ssl/ssl_lib.c" 3 4
36891                           ((void *)0)
36892   # 5610 "ssl/ssl_lib.c"
36893                           )));
36894   
36895       if (sc == 
36896   # 5612 "ssl/ssl_lib.c" 3 4
36897                ((void *)0)
36898   # 5612 "ssl/ssl_lib.c"
36899                    )
36900           return;
36901   
36902       sc->psk_find_session_cb = cb;
36903   }
36904   
36905   void SSL_CTX_set_psk_find_session_callback(SSL_CTX *ctx,
36906                                              SSL_psk_find_session_cb_func cb)
36907   {
36908       ctx->psk_find_session_cb = cb;
36909   }
36910   
36911   void SSL_set_psk_use_session_callback(SSL *s, SSL_psk_use_session_cb_func cb)
36912   {
36913       SSL_CONNECTION *sc = ((s) == 
36914   # 5626 "ssl/ssl_lib.c" 3 4
36915                           ((void *)0) 
36916   # 5626 "ssl/ssl_lib.c"
36917                           ? 
36918   # 5626 "ssl/ssl_lib.c" 3 4
36919                           ((void *)0) 
36920   # 5626 "ssl/ssl_lib.c"
36921                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
36922   # 5626 "ssl/ssl_lib.c" 3 4
36923                           ((void *)0)
36924   # 5626 "ssl/ssl_lib.c"
36925                           )));
36926   
36927       if (sc == 
36928   # 5628 "ssl/ssl_lib.c" 3 4
36929                ((void *)0)
36930   # 5628 "ssl/ssl_lib.c"
36931                    )
36932           return;
36933   
36934       sc->psk_use_session_cb = cb;
36935   }
36936   
36937   void SSL_CTX_set_psk_use_session_callback(SSL_CTX *ctx,
36938                                              SSL_psk_use_session_cb_func cb)
36939   {
36940       ctx->psk_use_session_cb = cb;
36941   }
36942   
36943   void SSL_CTX_set_msg_callback(SSL_CTX *ctx,
36944                                 void (*cb) (int write_p, int version,
36945                                             int content_type, const void *buf,
36946                                             size_t len, SSL *ssl, void *arg))
36947   {
36948       SSL_CTX_callback_ctrl(ctx, 15, (void (*)(void))cb);
36949   }
36950   
36951   void SSL_set_msg_callback(SSL *ssl,
36952                             void (*cb) (int write_p, int version,
36953                                         int content_type, const void *buf,
36954                                         size_t len, SSL *ssl, void *arg))
36955   {
36956       SSL_callback_ctrl(ssl, 15, (void (*)(void))cb);
36957   }
36958   
36959   void SSL_CTX_set_not_resumable_session_callback(SSL_CTX *ctx,
36960                                                   int (*cb) (SSL *ssl,
36961                                                              int
36962                                                              is_forward_secure))
36963   {
36964       SSL_CTX_callback_ctrl(ctx, 79,
36965                             (void (*)(void))cb);
36966   }
36967   
36968   void SSL_set_not_resumable_session_callback(SSL *ssl,
36969                                               int (*cb) (SSL *ssl,
36970                                                          int is_forward_secure))
36971   {
36972       SSL_callback_ctrl(ssl, 79,
36973                         (void (*)(void))cb);
36974   }
36975   
36976   void SSL_CTX_set_record_padding_callback(SSL_CTX *ctx,
36977                                            size_t (*cb) (SSL *ssl, int type,
36978                                                          size_t len, void *arg))
36979   {
36980       ctx->record_padding_cb = cb;
36981   }
36982   
36983   void SSL_CTX_set_record_padding_callback_arg(SSL_CTX *ctx, void *arg)
36984   {
36985       ctx->record_padding_arg = arg;
36986   }
36987   
36988   void *SSL_CTX_get_record_padding_callback_arg(const SSL_CTX *ctx)
36989   {
36990       return ctx->record_padding_arg;
36991   }
36992   
36993   int SSL_CTX_set_block_padding(SSL_CTX *ctx, size_t block_size)
36994   {
36995       if ((((ctx)->method) == OSSL_QUIC_client_method() || ((ctx)->method) == OSSL_QUIC_client_thread_method()) && block_size > 1)
36996           return 0;
36997   
36998   
36999       if (block_size == 1)
37000           ctx->block_padding = 0;
37001       else if (block_size <= 16384)
37002           ctx->block_padding = block_size;
37003       else
37004           return 0;
37005       return 1;
37006   }
37007   
37008   int SSL_set_record_padding_callback(SSL *ssl,
37009                                        size_t (*cb) (SSL *ssl, int type,
37010                                                      size_t len, void *arg))
37011   {
37012       BIO *b;
37013       SSL_CONNECTION *sc = ((ssl) == 
37014   # 5710 "ssl/ssl_lib.c" 3 4
37015                           ((void *)0) 
37016   # 5710 "ssl/ssl_lib.c"
37017                           ? 
37018   # 5710 "ssl/ssl_lib.c" 3 4
37019                           ((void *)0) 
37020   # 5710 "ssl/ssl_lib.c"
37021                           : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : 
37022   # 5710 "ssl/ssl_lib.c" 3 4
37023                           ((void *)0)
37024   # 5710 "ssl/ssl_lib.c"
37025                           ));
37026   
37027       if (sc == 
37028   # 5712 "ssl/ssl_lib.c" 3 4
37029                ((void *)0)
37030   # 5712 "ssl/ssl_lib.c"
37031                    )
37032           return 0;
37033   
37034       b = SSL_get_wbio(ssl);
37035       if (b == 
37036   # 5716 "ssl/ssl_lib.c" 3 4
37037               ((void *)0) 
37038   # 5716 "ssl/ssl_lib.c"
37039                    || !(0)) {
37040           sc->rlayer.record_padding_cb = cb;
37041           return 1;
37042       }
37043       return 0;
37044   }
37045   
37046   void SSL_set_record_padding_callback_arg(SSL *ssl, void *arg)
37047   {
37048       SSL_CONNECTION *sc = ((ssl) == 
37049   # 5725 "ssl/ssl_lib.c" 3 4
37050                           ((void *)0) 
37051   # 5725 "ssl/ssl_lib.c"
37052                           ? 
37053   # 5725 "ssl/ssl_lib.c" 3 4
37054                           ((void *)0) 
37055   # 5725 "ssl/ssl_lib.c"
37056                           : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls : 
37057   # 5725 "ssl/ssl_lib.c" 3 4
37058                           ((void *)0)
37059   # 5725 "ssl/ssl_lib.c"
37060                           )));
37061   
37062       if (sc == 
37063   # 5727 "ssl/ssl_lib.c" 3 4
37064                ((void *)0)
37065   # 5727 "ssl/ssl_lib.c"
37066                    )
37067           return;
37068   
37069       sc->rlayer.record_padding_arg = arg;
37070   }
37071   
37072   void *SSL_get_record_padding_callback_arg(const SSL *ssl)
37073   {
37074       const SSL_CONNECTION *sc = ((ssl) == 
37075   # 5735 "ssl/ssl_lib.c" 3 4
37076                                 ((void *)0) 
37077   # 5735 "ssl/ssl_lib.c"
37078                                 ? 
37079   # 5735 "ssl/ssl_lib.c" 3 4
37080                                 ((void *)0) 
37081   # 5735 "ssl/ssl_lib.c"
37082                                 : ((ssl)->type == 0 ? (const SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(ssl))->tls : 
37083   # 5735 "ssl/ssl_lib.c" 3 4
37084                                 ((void *)0)
37085   # 5735 "ssl/ssl_lib.c"
37086                                 )));
37087   
37088       if (sc == 
37089   # 5737 "ssl/ssl_lib.c" 3 4
37090                ((void *)0)
37091   # 5737 "ssl/ssl_lib.c"
37092                    )
37093           return 
37094   # 5738 "ssl/ssl_lib.c" 3 4
37095                 ((void *)0)
37096   # 5738 "ssl/ssl_lib.c"
37097                     ;
37098   
37099       return sc->rlayer.record_padding_arg;
37100   }
37101   
37102   int SSL_set_block_padding(SSL *ssl, size_t block_size)
37103   {
37104       SSL_CONNECTION *sc = ((ssl) == 
37105   # 5745 "ssl/ssl_lib.c" 3 4
37106                           ((void *)0) 
37107   # 5745 "ssl/ssl_lib.c"
37108                           ? 
37109   # 5745 "ssl/ssl_lib.c" 3 4
37110                           ((void *)0) 
37111   # 5745 "ssl/ssl_lib.c"
37112                           : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls : 
37113   # 5745 "ssl/ssl_lib.c" 3 4
37114                           ((void *)0)
37115   # 5745 "ssl/ssl_lib.c"
37116                           )));
37117   
37118       if (sc == 
37119   # 5747 "ssl/ssl_lib.c" 3 4
37120                ((void *)0) 
37121   # 5747 "ssl/ssl_lib.c"
37122                     || (((ssl) != 
37123   # 5747 "ssl/ssl_lib.c" 3 4
37124                         ((void *)0) 
37125   # 5747 "ssl/ssl_lib.c"
37126                         && ((ssl)->type == 1 || (ssl)->type == 2)) && block_size > 1))
37127           return 0;
37128   
37129   
37130       if (block_size == 1)
37131           sc->rlayer.block_padding = 0;
37132       else if (block_size <= 16384)
37133           sc->rlayer.block_padding = block_size;
37134       else
37135           return 0;
37136       return 1;
37137   }
37138   
37139   int SSL_set_num_tickets(SSL *s, size_t num_tickets)
37140   {
37141       SSL_CONNECTION *sc = ((s) == 
37142   # 5762 "ssl/ssl_lib.c" 3 4
37143                           ((void *)0) 
37144   # 5762 "ssl/ssl_lib.c"
37145                           ? 
37146   # 5762 "ssl/ssl_lib.c" 3 4
37147                           ((void *)0) 
37148   # 5762 "ssl/ssl_lib.c"
37149                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
37150   # 5762 "ssl/ssl_lib.c" 3 4
37151                           ((void *)0)
37152   # 5762 "ssl/ssl_lib.c"
37153                           )));
37154   
37155       if (sc == 
37156   # 5764 "ssl/ssl_lib.c" 3 4
37157                ((void *)0)
37158   # 5764 "ssl/ssl_lib.c"
37159                    )
37160           return 0;
37161   
37162       sc->num_tickets = num_tickets;
37163   
37164       return 1;
37165   }
37166   
37167   size_t SSL_get_num_tickets(const SSL *s)
37168   {
37169       const SSL_CONNECTION *sc = ((s) == 
37170   # 5774 "ssl/ssl_lib.c" 3 4
37171                                 ((void *)0) 
37172   # 5774 "ssl/ssl_lib.c"
37173                                 ? 
37174   # 5774 "ssl/ssl_lib.c" 3 4
37175                                 ((void *)0) 
37176   # 5774 "ssl/ssl_lib.c"
37177                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
37178   # 5774 "ssl/ssl_lib.c" 3 4
37179                                 ((void *)0)
37180   # 5774 "ssl/ssl_lib.c"
37181                                 )));
37182   
37183       if (sc == 
37184   # 5776 "ssl/ssl_lib.c" 3 4
37185                ((void *)0)
37186   # 5776 "ssl/ssl_lib.c"
37187                    )
37188           return 0;
37189   
37190       return sc->num_tickets;
37191   }
37192   
37193   int SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets)
37194   {
37195       ctx->num_tickets = num_tickets;
37196   
37197       return 1;
37198   }
37199   
37200   size_t SSL_CTX_get_num_tickets(const SSL_CTX *ctx)
37201   {
37202       return ctx->num_tickets;
37203   }
37204   
37205   
37206   int ssl_handshake_hash(SSL_CONNECTION *s,
37207                          unsigned char *out, size_t outlen,
37208                          size_t *hashlen)
37209   {
37210       EVP_MD_CTX *ctx = 
37211   # 5799 "ssl/ssl_lib.c" 3 4
37212                        ((void *)0)
37213   # 5799 "ssl/ssl_lib.c"
37214                            ;
37215       EVP_MD_CTX *hdgst = s->s3.handshake_dgst;
37216       int hashleni = EVP_MD_get_size(EVP_MD_CTX_get0_md(hdgst));
37217       int ret = 0;
37218   
37219       if (hashleni < 0 || (size_t)hashleni > outlen) {
37220           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 5805, __func__), ossl_statem_fatal)((s), (80), ((259|((0x1 << 18L)|(0x2 << 18L)))), 
37221   # 5805 "ssl/ssl_lib.c" 3 4
37222          ((void *)0)
37223   # 5805 "ssl/ssl_lib.c"
37224          );
37225           goto err;
37226       }
37227   
37228       ctx = EVP_MD_CTX_new();
37229       if (ctx == 
37230   # 5810 "ssl/ssl_lib.c" 3 4
37231                 ((void *)0)
37232   # 5810 "ssl/ssl_lib.c"
37233                     ) {
37234           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 5811, __func__), ossl_statem_fatal)((s), (80), ((259|((0x1 << 18L)|(0x2 << 18L)))), 
37235   # 5811 "ssl/ssl_lib.c" 3 4
37236          ((void *)0)
37237   # 5811 "ssl/ssl_lib.c"
37238          );
37239           goto err;
37240       }
37241   
37242       if (!EVP_MD_CTX_copy_ex(ctx, hdgst)
37243           || EVP_DigestFinal_ex(ctx, out, 
37244   # 5816 "ssl/ssl_lib.c" 3 4
37245                                          ((void *)0)
37246   # 5816 "ssl/ssl_lib.c"
37247                                              ) <= 0) {
37248           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 5817, __func__), ossl_statem_fatal)((s), (80), ((259|((0x1 << 18L)|(0x2 << 18L)))), 
37249   # 5817 "ssl/ssl_lib.c" 3 4
37250          ((void *)0)
37251   # 5817 "ssl/ssl_lib.c"
37252          );
37253           goto err;
37254       }
37255   
37256       *hashlen = hashleni;
37257   
37258       ret = 1;
37259    err:
37260       EVP_MD_CTX_free(ctx);
37261       return ret;
37262   }
37263   
37264   int SSL_session_reused(const SSL *s)
37265   {
37266       const SSL_CONNECTION *sc = ((s) == 
37267   # 5831 "ssl/ssl_lib.c" 3 4
37268                                 ((void *)0) 
37269   # 5831 "ssl/ssl_lib.c"
37270                                 ? 
37271   # 5831 "ssl/ssl_lib.c" 3 4
37272                                 ((void *)0) 
37273   # 5831 "ssl/ssl_lib.c"
37274                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
37275   # 5831 "ssl/ssl_lib.c" 3 4
37276                                 ((void *)0)
37277   # 5831 "ssl/ssl_lib.c"
37278                                 )));
37279   
37280       if (sc == 
37281   # 5833 "ssl/ssl_lib.c" 3 4
37282                ((void *)0)
37283   # 5833 "ssl/ssl_lib.c"
37284                    )
37285           return 0;
37286   
37287       return sc->hit;
37288   }
37289   
37290   int SSL_is_server(const SSL *s)
37291   {
37292       const SSL_CONNECTION *sc = ((s) == 
37293   # 5841 "ssl/ssl_lib.c" 3 4
37294                                 ((void *)0) 
37295   # 5841 "ssl/ssl_lib.c"
37296                                 ? 
37297   # 5841 "ssl/ssl_lib.c" 3 4
37298                                 ((void *)0) 
37299   # 5841 "ssl/ssl_lib.c"
37300                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
37301   # 5841 "ssl/ssl_lib.c" 3 4
37302                                 ((void *)0)
37303   # 5841 "ssl/ssl_lib.c"
37304                                 )));
37305   
37306       if (sc == 
37307   # 5843 "ssl/ssl_lib.c" 3 4
37308                ((void *)0)
37309   # 5843 "ssl/ssl_lib.c"
37310                    )
37311           return 0;
37312   
37313       return sc->server;
37314   }
37315   
37316   
37317   void SSL_set_debug(SSL *s, int debug)
37318   {
37319   
37320       (void)s;
37321       (void)debug;
37322   }
37323   
37324   
37325   void SSL_set_security_level(SSL *s, int level)
37326   {
37327       SSL_CONNECTION *sc = ((s) == 
37328   # 5860 "ssl/ssl_lib.c" 3 4
37329                           ((void *)0) 
37330   # 5860 "ssl/ssl_lib.c"
37331                           ? 
37332   # 5860 "ssl/ssl_lib.c" 3 4
37333                           ((void *)0) 
37334   # 5860 "ssl/ssl_lib.c"
37335                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
37336   # 5860 "ssl/ssl_lib.c" 3 4
37337                           ((void *)0)
37338   # 5860 "ssl/ssl_lib.c"
37339                           )));
37340   
37341       if (sc == 
37342   # 5862 "ssl/ssl_lib.c" 3 4
37343                ((void *)0)
37344   # 5862 "ssl/ssl_lib.c"
37345                    )
37346           return;
37347   
37348       sc->cert->sec_level = level;
37349   }
37350   
37351   int SSL_get_security_level(const SSL *s)
37352   {
37353       const SSL_CONNECTION *sc = ((s) == 
37354   # 5870 "ssl/ssl_lib.c" 3 4
37355                                 ((void *)0) 
37356   # 5870 "ssl/ssl_lib.c"
37357                                 ? 
37358   # 5870 "ssl/ssl_lib.c" 3 4
37359                                 ((void *)0) 
37360   # 5870 "ssl/ssl_lib.c"
37361                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
37362   # 5870 "ssl/ssl_lib.c" 3 4
37363                                 ((void *)0)
37364   # 5870 "ssl/ssl_lib.c"
37365                                 )));
37366   
37367       if (sc == 
37368   # 5872 "ssl/ssl_lib.c" 3 4
37369                ((void *)0)
37370   # 5872 "ssl/ssl_lib.c"
37371                    )
37372           return 0;
37373   
37374       return sc->cert->sec_level;
37375   }
37376   
37377   void SSL_set_security_callback(SSL *s,
37378                                  int (*cb) (const SSL *s, const SSL_CTX *ctx,
37379                                             int op, int bits, int nid,
37380                                             void *other, void *ex))
37381   {
37382       SSL_CONNECTION *sc = ((s) == 
37383   # 5883 "ssl/ssl_lib.c" 3 4
37384                           ((void *)0) 
37385   # 5883 "ssl/ssl_lib.c"
37386                           ? 
37387   # 5883 "ssl/ssl_lib.c" 3 4
37388                           ((void *)0) 
37389   # 5883 "ssl/ssl_lib.c"
37390                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
37391   # 5883 "ssl/ssl_lib.c" 3 4
37392                           ((void *)0)
37393   # 5883 "ssl/ssl_lib.c"
37394                           )));
37395   
37396       if (sc == 
37397   # 5885 "ssl/ssl_lib.c" 3 4
37398                ((void *)0)
37399   # 5885 "ssl/ssl_lib.c"
37400                    )
37401           return;
37402   
37403       sc->cert->sec_cb = cb;
37404   }
37405   
37406   int (*SSL_get_security_callback(const SSL *s)) (const SSL *s,
37407                                                   const SSL_CTX *ctx, int op,
37408                                                   int bits, int nid, void *other,
37409                                                   void *ex) {
37410       const SSL_CONNECTION *sc = ((s) == 
37411   # 5895 "ssl/ssl_lib.c" 3 4
37412                                 ((void *)0) 
37413   # 5895 "ssl/ssl_lib.c"
37414                                 ? 
37415   # 5895 "ssl/ssl_lib.c" 3 4
37416                                 ((void *)0) 
37417   # 5895 "ssl/ssl_lib.c"
37418                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
37419   # 5895 "ssl/ssl_lib.c" 3 4
37420                                 ((void *)0)
37421   # 5895 "ssl/ssl_lib.c"
37422                                 )));
37423   
37424       if (sc == 
37425   # 5897 "ssl/ssl_lib.c" 3 4
37426                ((void *)0)
37427   # 5897 "ssl/ssl_lib.c"
37428                    )
37429           return 
37430   # 5898 "ssl/ssl_lib.c" 3 4
37431                 ((void *)0)
37432   # 5898 "ssl/ssl_lib.c"
37433                     ;
37434   
37435       return sc->cert->sec_cb;
37436   }
37437   
37438   void SSL_set0_security_ex_data(SSL *s, void *ex)
37439   {
37440       SSL_CONNECTION *sc = ((s) == 
37441   # 5905 "ssl/ssl_lib.c" 3 4
37442                           ((void *)0) 
37443   # 5905 "ssl/ssl_lib.c"
37444                           ? 
37445   # 5905 "ssl/ssl_lib.c" 3 4
37446                           ((void *)0) 
37447   # 5905 "ssl/ssl_lib.c"
37448                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
37449   # 5905 "ssl/ssl_lib.c" 3 4
37450                           ((void *)0)
37451   # 5905 "ssl/ssl_lib.c"
37452                           )));
37453   
37454       if (sc == 
37455   # 5907 "ssl/ssl_lib.c" 3 4
37456                ((void *)0)
37457   # 5907 "ssl/ssl_lib.c"
37458                    )
37459           return;
37460   
37461       sc->cert->sec_ex = ex;
37462   }
37463   
37464   void *SSL_get0_security_ex_data(const SSL *s)
37465   {
37466       const SSL_CONNECTION *sc = ((s) == 
37467   # 5915 "ssl/ssl_lib.c" 3 4
37468                                 ((void *)0) 
37469   # 5915 "ssl/ssl_lib.c"
37470                                 ? 
37471   # 5915 "ssl/ssl_lib.c" 3 4
37472                                 ((void *)0) 
37473   # 5915 "ssl/ssl_lib.c"
37474                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
37475   # 5915 "ssl/ssl_lib.c" 3 4
37476                                 ((void *)0)
37477   # 5915 "ssl/ssl_lib.c"
37478                                 )));
37479   
37480       if (sc == 
37481   # 5917 "ssl/ssl_lib.c" 3 4
37482                ((void *)0)
37483   # 5917 "ssl/ssl_lib.c"
37484                    )
37485           return 
37486   # 5918 "ssl/ssl_lib.c" 3 4
37487                 ((void *)0)
37488   # 5918 "ssl/ssl_lib.c"
37489                     ;
37490   
37491       return sc->cert->sec_ex;
37492   }
37493   
37494   void SSL_CTX_set_security_level(SSL_CTX *ctx, int level)
37495   {
37496       ctx->cert->sec_level = level;
37497   }
37498   
37499   int SSL_CTX_get_security_level(const SSL_CTX *ctx)
37500   {
37501       return ctx->cert->sec_level;
37502   }
37503   
37504   void SSL_CTX_set_security_callback(SSL_CTX *ctx,
37505                                      int (*cb) (const SSL *s, const SSL_CTX *ctx,
37506                                                 int op, int bits, int nid,
37507                                                 void *other, void *ex))
37508   {
37509       ctx->cert->sec_cb = cb;
37510   }
37511   
37512   int (*SSL_CTX_get_security_callback(const SSL_CTX *ctx)) (const SSL *s,
37513                                                             const SSL_CTX *ctx,
37514                                                             int op, int bits,
37515                                                             int nid,
37516                                                             void *other,
37517                                                             void *ex) {
37518       return ctx->cert->sec_cb;
37519   }
37520   
37521   void SSL_CTX_set0_security_ex_data(SSL_CTX *ctx, void *ex)
37522   {
37523       ctx->cert->sec_ex = ex;
37524   }
37525   
37526   void *SSL_CTX_get0_security_ex_data(const SSL_CTX *ctx)
37527   {
37528       return ctx->cert->sec_ex;
37529   }
37530   
37531   uint64_t SSL_CTX_get_options(const SSL_CTX *ctx)
37532   {
37533       return ctx->options;
37534   }
37535   
37536   uint64_t SSL_get_options(const SSL *s)
37537   {
37538       const SSL_CONNECTION *sc = ((s) == 
37539   # 5967 "ssl/ssl_lib.c" 3 4
37540                                 ((void *)0) 
37541   # 5967 "ssl/ssl_lib.c"
37542                                 ? 
37543   # 5967 "ssl/ssl_lib.c" 3 4
37544                                 ((void *)0) 
37545   # 5967 "ssl/ssl_lib.c"
37546                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
37547   # 5967 "ssl/ssl_lib.c" 3 4
37548                                 ((void *)0)
37549   # 5967 "ssl/ssl_lib.c"
37550                                 )));
37551   
37552   
37553       if (((s) != 
37554   # 5970 "ssl/ssl_lib.c" 3 4
37555          ((void *)0) 
37556   # 5970 "ssl/ssl_lib.c"
37557          && ((s)->type == 1 || (s)->type == 2)))
37558           return ossl_quic_get_options(s);
37559   
37560   
37561       if (sc == 
37562   # 5974 "ssl/ssl_lib.c" 3 4
37563                ((void *)0)
37564   # 5974 "ssl/ssl_lib.c"
37565                    )
37566           return 0;
37567   
37568       return sc->options;
37569   }
37570   
37571   uint64_t SSL_CTX_set_options(SSL_CTX *ctx, uint64_t op)
37572   {
37573       return ctx->options |= op;
37574   }
37575   
37576   uint64_t SSL_set_options(SSL *s, uint64_t op)
37577   {
37578       SSL_CONNECTION *sc;
37579       OSSL_PARAM options[2], *opts = options;
37580   
37581   
37582       if (((s) != 
37583   # 5991 "ssl/ssl_lib.c" 3 4
37584          ((void *)0) 
37585   # 5991 "ssl/ssl_lib.c"
37586          && ((s)->type == 1 || (s)->type == 2)))
37587           return ossl_quic_set_options(s, op);
37588   
37589   
37590       sc = ((s) == 
37591   # 5995 "ssl/ssl_lib.c" 3 4
37592           ((void *)0) 
37593   # 5995 "ssl/ssl_lib.c"
37594           ? 
37595   # 5995 "ssl/ssl_lib.c" 3 4
37596           ((void *)0) 
37597   # 5995 "ssl/ssl_lib.c"
37598           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
37599   # 5995 "ssl/ssl_lib.c" 3 4
37600           ((void *)0)
37601   # 5995 "ssl/ssl_lib.c"
37602           )));
37603       if (sc == 
37604   # 5996 "ssl/ssl_lib.c" 3 4
37605                ((void *)0)
37606   # 5996 "ssl/ssl_lib.c"
37607                    )
37608           return 0;
37609   
37610       sc->options |= op;
37611   
37612       *opts++ = OSSL_PARAM_construct_uint64("options",
37613                                             &sc->options);
37614       *opts = OSSL_PARAM_construct_end();
37615   
37616   
37617       sc->rlayer.rrlmethod->set_options(sc->rlayer.rrl, options);
37618       sc->rlayer.wrlmethod->set_options(sc->rlayer.wrl, options);
37619   
37620       return sc->options;
37621   }
37622   
37623   uint64_t SSL_CTX_clear_options(SSL_CTX *ctx, uint64_t op)
37624   {
37625       return ctx->options &= ~op;
37626   }
37627   
37628   uint64_t SSL_clear_options(SSL *s, uint64_t op)
37629   {
37630       SSL_CONNECTION *sc = ((s) == 
37631   # 6019 "ssl/ssl_lib.c" 3 4
37632                           ((void *)0) 
37633   # 6019 "ssl/ssl_lib.c"
37634                           ? 
37635   # 6019 "ssl/ssl_lib.c" 3 4
37636                           ((void *)0) 
37637   # 6019 "ssl/ssl_lib.c"
37638                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
37639   # 6019 "ssl/ssl_lib.c" 3 4
37640                           ((void *)0)
37641   # 6019 "ssl/ssl_lib.c"
37642                           )));
37643       OSSL_PARAM options[2], *opts = options;
37644   
37645   
37646       if (((s) != 
37647   # 6023 "ssl/ssl_lib.c" 3 4
37648          ((void *)0) 
37649   # 6023 "ssl/ssl_lib.c"
37650          && ((s)->type == 1 || (s)->type == 2)))
37651           return ossl_quic_clear_options(s, op);
37652   
37653   
37654       if (sc == 
37655   # 6027 "ssl/ssl_lib.c" 3 4
37656                ((void *)0)
37657   # 6027 "ssl/ssl_lib.c"
37658                    )
37659           return 0;
37660   
37661       sc->options &= ~op;
37662   
37663       *opts++ = OSSL_PARAM_construct_uint64("options",
37664                                             &sc->options);
37665       *opts = OSSL_PARAM_construct_end();
37666   
37667   
37668       sc->rlayer.rrlmethod->set_options(sc->rlayer.rrl, options);
37669       sc->rlayer.wrlmethod->set_options(sc->rlayer.wrl, options);
37670   
37671       return sc->options;
37672   }
37673   
37674   struct stack_st_X509 *SSL_get0_verified_chain(const SSL *s)
37675   {
37676       const SSL_CONNECTION *sc = ((s) == 
37677   # 6045 "ssl/ssl_lib.c" 3 4
37678                                 ((void *)0) 
37679   # 6045 "ssl/ssl_lib.c"
37680                                 ? 
37681   # 6045 "ssl/ssl_lib.c" 3 4
37682                                 ((void *)0) 
37683   # 6045 "ssl/ssl_lib.c"
37684                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
37685   # 6045 "ssl/ssl_lib.c" 3 4
37686                                 ((void *)0)
37687   # 6045 "ssl/ssl_lib.c"
37688                                 )));
37689   
37690       if (sc == 
37691   # 6047 "ssl/ssl_lib.c" 3 4
37692                ((void *)0)
37693   # 6047 "ssl/ssl_lib.c"
37694                    )
37695           return 
37696   # 6048 "ssl/ssl_lib.c" 3 4
37697                 ((void *)0)
37698   # 6048 "ssl/ssl_lib.c"
37699                     ;
37700   
37701       return sc->verified_chain;
37702   }
37703   
37704   static int ssl_cipher_id_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) { SSL_CIPHER const *a = a_; SSL_CIPHER const *b = b_; return ssl_cipher_id_cmp(a,b); } SSL_CIPHER *OBJ_bsearch_ssl_cipher_id(SSL_CIPHER *key, SSL_CIPHER const *base, int num) { return (SSL_CIPHER *)OBJ_bsearch_(key, base, num, sizeof(SSL_CIPHER), ssl_cipher_id_cmp_BSEARCH_CMP_FN); } extern void dummy_prototype(void);
37705   # 6066 "ssl/ssl_lib.c"
37706   static int ct_move_scts(struct stack_st_SCT **dst, struct stack_st_SCT *src,
37707                           sct_source_t origin)
37708   {
37709       int scts_moved = 0;
37710       SCT *sct = 
37711   # 6070 "ssl/ssl_lib.c" 3 4
37712                 ((void *)0)
37713   # 6070 "ssl/ssl_lib.c"
37714                     ;
37715   
37716       if (*dst == 
37717   # 6072 "ssl/ssl_lib.c" 3 4
37718                  ((void *)0)
37719   # 6072 "ssl/ssl_lib.c"
37720                      ) {
37721           *dst = ((struct stack_st_SCT *)OPENSSL_sk_new_null());
37722           if (*dst == 
37723   # 6074 "ssl/ssl_lib.c" 3 4
37724                      ((void *)0)
37725   # 6074 "ssl/ssl_lib.c"
37726                          ) {
37727               (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6075,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
37728   # 6075 "ssl/ssl_lib.c" 3 4
37729              ((void *)0)
37730   # 6075 "ssl/ssl_lib.c"
37731              );
37732               goto err;
37733           }
37734       }
37735   
37736       while ((sct = ((SCT *)OPENSSL_sk_pop(ossl_check_SCT_sk_type(src)))) != 
37737   # 6080 "ssl/ssl_lib.c" 3 4
37738                                        ((void *)0)
37739   # 6080 "ssl/ssl_lib.c"
37740                                            ) {
37741           if (SCT_set_source(sct, origin) != 1)
37742               goto err;
37743   
37744           if (!OPENSSL_sk_push(ossl_check_SCT_sk_type(*dst), ossl_check_SCT_type(sct)))
37745               goto err;
37746           scts_moved += 1;
37747       }
37748   
37749       return scts_moved;
37750    err:
37751       SCT_free(sct);
37752       return -1;
37753   }
37754   
37755   
37756   
37757   
37758   
37759   static int ct_extract_tls_extension_scts(SSL_CONNECTION *s)
37760   {
37761       int scts_extracted = 0;
37762   
37763       if (s->ext.scts != 
37764   # 6103 "ssl/ssl_lib.c" 3 4
37765                         ((void *)0)
37766   # 6103 "ssl/ssl_lib.c"
37767                             ) {
37768           const unsigned char *p = s->ext.scts;
37769           struct stack_st_SCT *scts = o2i_SCT_LIST(
37770   # 6105 "ssl/ssl_lib.c" 3 4
37771                                             ((void *)0)
37772   # 6105 "ssl/ssl_lib.c"
37773                                                 , &p, s->ext.scts_len);
37774   
37775           scts_extracted = ct_move_scts(&s->scts, scts, SCT_SOURCE_TLS_EXTENSION);
37776   
37777           SCT_LIST_free(scts);
37778       }
37779   
37780       return scts_extracted;
37781   }
37782   # 6123 "ssl/ssl_lib.c"
37783   static int ct_extract_ocsp_response_scts(SSL_CONNECTION *s)
37784   {
37785   
37786       int scts_extracted = 0;
37787       const unsigned char *p;
37788       OCSP_BASICRESP *br = 
37789   # 6128 "ssl/ssl_lib.c" 3 4
37790                           ((void *)0)
37791   # 6128 "ssl/ssl_lib.c"
37792                               ;
37793       OCSP_RESPONSE *rsp = 
37794   # 6129 "ssl/ssl_lib.c" 3 4
37795                           ((void *)0)
37796   # 6129 "ssl/ssl_lib.c"
37797                               ;
37798       struct stack_st_SCT *scts = 
37799   # 6130 "ssl/ssl_lib.c" 3 4
37800                            ((void *)0)
37801   # 6130 "ssl/ssl_lib.c"
37802                                ;
37803       int i;
37804   
37805       if (s->ext.ocsp.resp == 
37806   # 6133 "ssl/ssl_lib.c" 3 4
37807                              ((void *)0) 
37808   # 6133 "ssl/ssl_lib.c"
37809                                   || s->ext.ocsp.resp_len == 0)
37810           goto err;
37811   
37812       p = s->ext.ocsp.resp;
37813       rsp = d2i_OCSP_RESPONSE(
37814   # 6137 "ssl/ssl_lib.c" 3 4
37815                              ((void *)0)
37816   # 6137 "ssl/ssl_lib.c"
37817                                  , &p, (int)s->ext.ocsp.resp_len);
37818       if (rsp == 
37819   # 6138 "ssl/ssl_lib.c" 3 4
37820                 ((void *)0)
37821   # 6138 "ssl/ssl_lib.c"
37822                     )
37823           goto err;
37824   
37825       br = OCSP_response_get1_basic(rsp);
37826       if (br == 
37827   # 6142 "ssl/ssl_lib.c" 3 4
37828                ((void *)0)
37829   # 6142 "ssl/ssl_lib.c"
37830                    )
37831           goto err;
37832   
37833       for (i = 0; i < OCSP_resp_count(br); ++i) {
37834           OCSP_SINGLERESP *single = OCSP_resp_get0(br, i);
37835   
37836           if (single == 
37837   # 6148 "ssl/ssl_lib.c" 3 4
37838                        ((void *)0)
37839   # 6148 "ssl/ssl_lib.c"
37840                            )
37841               continue;
37842   
37843           scts =
37844               OCSP_SINGLERESP_get1_ext_d2i(single, 954, 
37845   # 6152 "ssl/ssl_lib.c" 3 4
37846                                                                     ((void *)0)
37847   # 6152 "ssl/ssl_lib.c"
37848                                                                         , 
37849   # 6152 "ssl/ssl_lib.c" 3 4
37850                                                                           ((void *)0)
37851   # 6152 "ssl/ssl_lib.c"
37852                                                                               );
37853           scts_extracted =
37854               ct_move_scts(&s->scts, scts, SCT_SOURCE_OCSP_STAPLED_RESPONSE);
37855           if (scts_extracted < 0)
37856               goto err;
37857       }
37858    err:
37859       SCT_LIST_free(scts);
37860       OCSP_BASICRESP_free(br);
37861       OCSP_RESPONSE_free(rsp);
37862       return scts_extracted;
37863   
37864   
37865   
37866   
37867   }
37868   
37869   
37870   
37871   
37872   
37873   
37874   static int ct_extract_x509v3_extension_scts(SSL_CONNECTION *s)
37875   {
37876       int scts_extracted = 0;
37877       X509 *cert = s->session != 
37878   # 6177 "ssl/ssl_lib.c" 3 4
37879                                 ((void *)0) 
37880   # 6177 "ssl/ssl_lib.c"
37881                                      ? s->session->peer : 
37882   # 6177 "ssl/ssl_lib.c" 3 4
37883                                                           ((void *)0)
37884   # 6177 "ssl/ssl_lib.c"
37885                                                               ;
37886   
37887       if (cert != 
37888   # 6179 "ssl/ssl_lib.c" 3 4
37889                  ((void *)0)
37890   # 6179 "ssl/ssl_lib.c"
37891                      ) {
37892           struct stack_st_SCT *scts =
37893               X509_get_ext_d2i(cert, 951, 
37894   # 6181 "ssl/ssl_lib.c" 3 4
37895                                                          ((void *)0)
37896   # 6181 "ssl/ssl_lib.c"
37897                                                              , 
37898   # 6181 "ssl/ssl_lib.c" 3 4
37899                                                                ((void *)0)
37900   # 6181 "ssl/ssl_lib.c"
37901                                                                    );
37902   
37903           scts_extracted =
37904               ct_move_scts(&s->scts, scts, SCT_SOURCE_X509V3_EXTENSION);
37905   
37906           SCT_LIST_free(scts);
37907       }
37908   
37909       return scts_extracted;
37910   }
37911   
37912   
37913   
37914   
37915   
37916   
37917   const struct stack_st_SCT *SSL_get0_peer_scts(SSL *s)
37918   {
37919       SSL_CONNECTION *sc = ((s) == 
37920   # 6199 "ssl/ssl_lib.c" 3 4
37921                           ((void *)0) 
37922   # 6199 "ssl/ssl_lib.c"
37923                           ? 
37924   # 6199 "ssl/ssl_lib.c" 3 4
37925                           ((void *)0) 
37926   # 6199 "ssl/ssl_lib.c"
37927                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
37928   # 6199 "ssl/ssl_lib.c" 3 4
37929                           ((void *)0)
37930   # 6199 "ssl/ssl_lib.c"
37931                           )));
37932   
37933       if (sc == 
37934   # 6201 "ssl/ssl_lib.c" 3 4
37935                ((void *)0)
37936   # 6201 "ssl/ssl_lib.c"
37937                    )
37938           return 
37939   # 6202 "ssl/ssl_lib.c" 3 4
37940                 ((void *)0)
37941   # 6202 "ssl/ssl_lib.c"
37942                     ;
37943   
37944       if (!sc->scts_parsed) {
37945           if (ct_extract_tls_extension_scts(sc) < 0 ||
37946               ct_extract_ocsp_response_scts(sc) < 0 ||
37947               ct_extract_x509v3_extension_scts(sc) < 0)
37948               goto err;
37949   
37950           sc->scts_parsed = 1;
37951       }
37952       return sc->scts;
37953    err:
37954       return 
37955   # 6214 "ssl/ssl_lib.c" 3 4
37956             ((void *)0)
37957   # 6214 "ssl/ssl_lib.c"
37958                 ;
37959   }
37960   
37961   static int ct_permissive(const CT_POLICY_EVAL_CTX *ctx,
37962                            const struct stack_st_SCT *scts, void *unused_arg)
37963   {
37964       return 1;
37965   }
37966   
37967   static int ct_strict(const CT_POLICY_EVAL_CTX *ctx,
37968                        const struct stack_st_SCT *scts, void *unused_arg)
37969   {
37970       int count = scts != 
37971   # 6226 "ssl/ssl_lib.c" 3 4
37972                          ((void *)0) 
37973   # 6226 "ssl/ssl_lib.c"
37974                               ? OPENSSL_sk_num(ossl_check_const_SCT_sk_type(scts)) : 0;
37975       int i;
37976   
37977       for (i = 0; i < count; ++i) {
37978           SCT *sct = ((SCT *)OPENSSL_sk_value(ossl_check_const_SCT_sk_type(scts), (i)));
37979           int status = SCT_get_validation_status(sct);
37980   
37981           if (status == SCT_VALIDATION_STATUS_VALID)
37982               return 1;
37983       }
37984       (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6236,__func__), ERR_set_error)((20),(216),
37985   # 6236 "ssl/ssl_lib.c" 3 4
37986      ((void *)0)
37987   # 6236 "ssl/ssl_lib.c"
37988      );
37989       return 0;
37990   }
37991   
37992   int SSL_set_ct_validation_callback(SSL *s, ssl_ct_validation_cb callback,
37993                                      void *arg)
37994   {
37995       SSL_CONNECTION *sc = ((s) == 
37996   # 6243 "ssl/ssl_lib.c" 3 4
37997                           ((void *)0) 
37998   # 6243 "ssl/ssl_lib.c"
37999                           ? 
38000   # 6243 "ssl/ssl_lib.c" 3 4
38001                           ((void *)0) 
38002   # 6243 "ssl/ssl_lib.c"
38003                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
38004   # 6243 "ssl/ssl_lib.c" 3 4
38005                           ((void *)0)
38006   # 6243 "ssl/ssl_lib.c"
38007                           )));
38008   
38009       if (sc == 
38010   # 6245 "ssl/ssl_lib.c" 3 4
38011                ((void *)0)
38012   # 6245 "ssl/ssl_lib.c"
38013                    )
38014           return 0;
38015   
38016   
38017   
38018   
38019   
38020       if (callback != 
38021   # 6252 "ssl/ssl_lib.c" 3 4
38022                      ((void *)0) 
38023   # 6252 "ssl/ssl_lib.c"
38024                           && SSL_CTX_has_client_custom_ext(s->ctx,
38025                                                             18))
38026       {
38027           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6255,__func__), ERR_set_error)((20),(206),
38028   # 6255 "ssl/ssl_lib.c" 3 4
38029          ((void *)0)
38030   # 6255 "ssl/ssl_lib.c"
38031          );
38032           return 0;
38033       }
38034   
38035       if (callback != 
38036   # 6259 "ssl/ssl_lib.c" 3 4
38037                      ((void *)0)
38038   # 6259 "ssl/ssl_lib.c"
38039                          ) {
38040   
38041   
38042   
38043           if (!SSL_ctrl(s,65,1,
38044   # 6263 "ssl/ssl_lib.c" 3 4
38045               ((void *)0)
38046   # 6263 "ssl/ssl_lib.c"
38047               ))
38048               return 0;
38049       }
38050   
38051       sc->ct_validation_callback = callback;
38052       sc->ct_validation_callback_arg = arg;
38053   
38054       return 1;
38055   }
38056   
38057   int SSL_CTX_set_ct_validation_callback(SSL_CTX *ctx,
38058                                          ssl_ct_validation_cb callback, void *arg)
38059   {
38060   
38061   
38062   
38063   
38064       if (callback != 
38065   # 6280 "ssl/ssl_lib.c" 3 4
38066                      ((void *)0) 
38067   # 6280 "ssl/ssl_lib.c"
38068                           && SSL_CTX_has_client_custom_ext(ctx,
38069                                                             18))
38070       {
38071           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6283,__func__), ERR_set_error)((20),(206),
38072   # 6283 "ssl/ssl_lib.c" 3 4
38073          ((void *)0)
38074   # 6283 "ssl/ssl_lib.c"
38075          );
38076           return 0;
38077       }
38078   
38079       ctx->ct_validation_callback = callback;
38080       ctx->ct_validation_callback_arg = arg;
38081       return 1;
38082   }
38083   
38084   int SSL_ct_is_enabled(const SSL *s)
38085   {
38086       const SSL_CONNECTION *sc = ((s) == 
38087   # 6294 "ssl/ssl_lib.c" 3 4
38088                                 ((void *)0) 
38089   # 6294 "ssl/ssl_lib.c"
38090                                 ? 
38091   # 6294 "ssl/ssl_lib.c" 3 4
38092                                 ((void *)0) 
38093   # 6294 "ssl/ssl_lib.c"
38094                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
38095   # 6294 "ssl/ssl_lib.c" 3 4
38096                                 ((void *)0)
38097   # 6294 "ssl/ssl_lib.c"
38098                                 )));
38099   
38100       if (sc == 
38101   # 6296 "ssl/ssl_lib.c" 3 4
38102                ((void *)0)
38103   # 6296 "ssl/ssl_lib.c"
38104                    )
38105           return 0;
38106   
38107       return sc->ct_validation_callback != 
38108   # 6299 "ssl/ssl_lib.c" 3 4
38109                                           ((void *)0)
38110   # 6299 "ssl/ssl_lib.c"
38111                                               ;
38112   }
38113   
38114   int SSL_CTX_ct_is_enabled(const SSL_CTX *ctx)
38115   {
38116       return ctx->ct_validation_callback != 
38117   # 6304 "ssl/ssl_lib.c" 3 4
38118                                            ((void *)0)
38119   # 6304 "ssl/ssl_lib.c"
38120                                                ;
38121   }
38122   
38123   int ssl_validate_ct(SSL_CONNECTION *s)
38124   {
38125       int ret = 0;
38126       X509 *cert = s->session != 
38127   # 6310 "ssl/ssl_lib.c" 3 4
38128                                 ((void *)0) 
38129   # 6310 "ssl/ssl_lib.c"
38130                                      ? s->session->peer : 
38131   # 6310 "ssl/ssl_lib.c" 3 4
38132                                                           ((void *)0)
38133   # 6310 "ssl/ssl_lib.c"
38134                                                               ;
38135       X509 *issuer;
38136       SSL_DANE *dane = &s->dane;
38137       CT_POLICY_EVAL_CTX *ctx = 
38138   # 6313 "ssl/ssl_lib.c" 3 4
38139                                ((void *)0)
38140   # 6313 "ssl/ssl_lib.c"
38141                                    ;
38142       const struct stack_st_SCT *scts;
38143   # 6327 "ssl/ssl_lib.c"
38144       if (s->ct_validation_callback == 
38145   # 6327 "ssl/ssl_lib.c" 3 4
38146                                       ((void *)0) 
38147   # 6327 "ssl/ssl_lib.c"
38148                                            || cert == 
38149   # 6327 "ssl/ssl_lib.c" 3 4
38150                                                       ((void *)0) 
38151   # 6327 "ssl/ssl_lib.c"
38152                                                            ||
38153           s->verify_result != 0 ||
38154           s->verified_chain == 
38155   # 6329 "ssl/ssl_lib.c" 3 4
38156                               ((void *)0) 
38157   # 6329 "ssl/ssl_lib.c"
38158                                    || OPENSSL_sk_num(ossl_check_const_X509_sk_type(s->verified_chain)) <= 1)
38159           return 1;
38160   
38161   
38162   
38163   
38164   
38165       if (((dane) != 
38166   # 6336 "ssl/ssl_lib.c" 3 4
38167          ((void *)0) 
38168   # 6336 "ssl/ssl_lib.c"
38169          && sk_danetls_record_num((dane)->trecs) > 0) && dane->mtlsa != 
38170   # 6336 "ssl/ssl_lib.c" 3 4
38171                                                  ((void *)0)
38172   # 6336 "ssl/ssl_lib.c"
38173                                                      ) {
38174           switch (dane->mtlsa->usage) {
38175           case 2:
38176           case 3:
38177               return 1;
38178           }
38179       }
38180   
38181       ctx = CT_POLICY_EVAL_CTX_new_ex(((s)->ssl.ctx)->libctx,
38182                                       ((s)->ssl.ctx)->propq);
38183       if (ctx == 
38184   # 6346 "ssl/ssl_lib.c" 3 4
38185                 ((void *)0)
38186   # 6346 "ssl/ssl_lib.c"
38187                     ) {
38188           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6347, __func__), ossl_statem_fatal)((s), (80), ((50 | (0x2 << 18L))), 
38189   # 6347 "ssl/ssl_lib.c" 3 4
38190          ((void *)0)
38191   # 6347 "ssl/ssl_lib.c"
38192          );
38193           goto end;
38194       }
38195   
38196       issuer = ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(s->verified_chain), (1)));
38197       CT_POLICY_EVAL_CTX_set1_cert(ctx, cert);
38198       CT_POLICY_EVAL_CTX_set1_issuer(ctx, issuer);
38199       CT_POLICY_EVAL_CTX_set_shared_CTLOG_STORE(ctx,
38200               ((s)->ssl.ctx)->ctlog_store);
38201       CT_POLICY_EVAL_CTX_set_time(
38202               ctx, (uint64_t)SSL_SESSION_get_time(s->session) * 1000);
38203   
38204       scts = SSL_get0_peer_scts((&(s)->ssl));
38205   # 6375 "ssl/ssl_lib.c"
38206       if (SCT_LIST_validate(scts, ctx) < 0) {
38207           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6376, __func__), ossl_statem_fatal)((s), (40), (208), 
38208   # 6376 "ssl/ssl_lib.c" 3 4
38209          ((void *)0)
38210   # 6376 "ssl/ssl_lib.c"
38211          );
38212           goto end;
38213       }
38214   
38215       ret = s->ct_validation_callback(ctx, scts, s->ct_validation_callback_arg);
38216       if (ret < 0)
38217           ret = 0;
38218       if (!ret)
38219           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6384, __func__), ossl_statem_fatal)((s), (40), (234), 
38220   # 6384 "ssl/ssl_lib.c" 3 4
38221          ((void *)0)
38222   # 6384 "ssl/ssl_lib.c"
38223          );
38224   
38225    end:
38226       CT_POLICY_EVAL_CTX_free(ctx);
38227   # 6403 "ssl/ssl_lib.c"
38228       if (ret <= 0)
38229           s->verify_result = 71;
38230       return ret;
38231   }
38232   
38233   int SSL_CTX_enable_ct(SSL_CTX *ctx, int validation_mode)
38234   {
38235       switch (validation_mode) {
38236       default:
38237           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6412,__func__), ERR_set_error)((20),(212),
38238   # 6412 "ssl/ssl_lib.c" 3 4
38239          ((void *)0)
38240   # 6412 "ssl/ssl_lib.c"
38241          );
38242           return 0;
38243       case SSL_CT_VALIDATION_PERMISSIVE:
38244           return SSL_CTX_set_ct_validation_callback(ctx, ct_permissive, 
38245   # 6415 "ssl/ssl_lib.c" 3 4
38246                                                                        ((void *)0)
38247   # 6415 "ssl/ssl_lib.c"
38248                                                                            );
38249       case SSL_CT_VALIDATION_STRICT:
38250           return SSL_CTX_set_ct_validation_callback(ctx, ct_strict, 
38251   # 6417 "ssl/ssl_lib.c" 3 4
38252                                                                    ((void *)0)
38253   # 6417 "ssl/ssl_lib.c"
38254                                                                        );
38255       }
38256   }
38257   
38258   int SSL_enable_ct(SSL *s, int validation_mode)
38259   {
38260       switch (validation_mode) {
38261       default:
38262           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6425,__func__), ERR_set_error)((20),(212),
38263   # 6425 "ssl/ssl_lib.c" 3 4
38264          ((void *)0)
38265   # 6425 "ssl/ssl_lib.c"
38266          );
38267           return 0;
38268       case SSL_CT_VALIDATION_PERMISSIVE:
38269           return SSL_set_ct_validation_callback(s, ct_permissive, 
38270   # 6428 "ssl/ssl_lib.c" 3 4
38271                                                                  ((void *)0)
38272   # 6428 "ssl/ssl_lib.c"
38273                                                                      );
38274       case SSL_CT_VALIDATION_STRICT:
38275           return SSL_set_ct_validation_callback(s, ct_strict, 
38276   # 6430 "ssl/ssl_lib.c" 3 4
38277                                                              ((void *)0)
38278   # 6430 "ssl/ssl_lib.c"
38279                                                                  );
38280       }
38281   }
38282   
38283   int SSL_CTX_set_default_ctlog_list_file(SSL_CTX *ctx)
38284   {
38285       return CTLOG_STORE_load_default_file(ctx->ctlog_store);
38286   }
38287   
38288   int SSL_CTX_set_ctlog_list_file(SSL_CTX *ctx, const char *path)
38289   {
38290       return CTLOG_STORE_load_file(ctx->ctlog_store, path);
38291   }
38292   
38293   void SSL_CTX_set0_ctlog_store(SSL_CTX *ctx, CTLOG_STORE *logs)
38294   {
38295       CTLOG_STORE_free(ctx->ctlog_store);
38296       ctx->ctlog_store = logs;
38297   }
38298   
38299   const CTLOG_STORE *SSL_CTX_get0_ctlog_store(const SSL_CTX *ctx)
38300   {
38301       return ctx->ctlog_store;
38302   }
38303   
38304   
38305   
38306   void SSL_CTX_set_client_hello_cb(SSL_CTX *c, SSL_client_hello_cb_fn cb,
38307                                    void *arg)
38308   {
38309       c->client_hello_cb = cb;
38310       c->client_hello_cb_arg = arg;
38311   }
38312   
38313   int SSL_client_hello_isv2(SSL *s)
38314   {
38315       const SSL_CONNECTION *sc = ((s) == 
38316   # 6466 "ssl/ssl_lib.c" 3 4
38317                                 ((void *)0) 
38318   # 6466 "ssl/ssl_lib.c"
38319                                 ? 
38320   # 6466 "ssl/ssl_lib.c" 3 4
38321                                 ((void *)0) 
38322   # 6466 "ssl/ssl_lib.c"
38323                                 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
38324   # 6466 "ssl/ssl_lib.c" 3 4
38325                                 ((void *)0)
38326   # 6466 "ssl/ssl_lib.c"
38327                                 )));
38328   
38329       if (sc == 
38330   # 6468 "ssl/ssl_lib.c" 3 4
38331                ((void *)0)
38332   # 6468 "ssl/ssl_lib.c"
38333                    )
38334           return 0;
38335   
38336       if (sc->clienthello == 
38337   # 6471 "ssl/ssl_lib.c" 3 4
38338                             ((void *)0)
38339   # 6471 "ssl/ssl_lib.c"
38340                                 )
38341           return 0;
38342       return sc->clienthello->isv2;
38343   }
38344   
38345   unsigned int SSL_client_hello_get0_legacy_version(SSL *s)
38346   {
38347       const SSL_CONNECTION *sc = ((s) == 
38348   # 6478 "ssl/ssl_lib.c" 3 4
38349                                 ((void *)0) 
38350   # 6478 "ssl/ssl_lib.c"
38351                                 ? 
38352   # 6478 "ssl/ssl_lib.c" 3 4
38353                                 ((void *)0) 
38354   # 6478 "ssl/ssl_lib.c"
38355                                 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
38356   # 6478 "ssl/ssl_lib.c" 3 4
38357                                 ((void *)0)
38358   # 6478 "ssl/ssl_lib.c"
38359                                 )));
38360   
38361       if (sc == 
38362   # 6480 "ssl/ssl_lib.c" 3 4
38363                ((void *)0)
38364   # 6480 "ssl/ssl_lib.c"
38365                    )
38366           return 0;
38367   
38368       if (sc->clienthello == 
38369   # 6483 "ssl/ssl_lib.c" 3 4
38370                             ((void *)0)
38371   # 6483 "ssl/ssl_lib.c"
38372                                 )
38373           return 0;
38374       return sc->clienthello->legacy_version;
38375   }
38376   
38377   size_t SSL_client_hello_get0_random(SSL *s, const unsigned char **out)
38378   {
38379       const SSL_CONNECTION *sc = ((s) == 
38380   # 6490 "ssl/ssl_lib.c" 3 4
38381                                 ((void *)0) 
38382   # 6490 "ssl/ssl_lib.c"
38383                                 ? 
38384   # 6490 "ssl/ssl_lib.c" 3 4
38385                                 ((void *)0) 
38386   # 6490 "ssl/ssl_lib.c"
38387                                 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
38388   # 6490 "ssl/ssl_lib.c" 3 4
38389                                 ((void *)0)
38390   # 6490 "ssl/ssl_lib.c"
38391                                 )));
38392   
38393       if (sc == 
38394   # 6492 "ssl/ssl_lib.c" 3 4
38395                ((void *)0)
38396   # 6492 "ssl/ssl_lib.c"
38397                    )
38398           return 0;
38399   
38400       if (sc->clienthello == 
38401   # 6495 "ssl/ssl_lib.c" 3 4
38402                             ((void *)0)
38403   # 6495 "ssl/ssl_lib.c"
38404                                 )
38405           return 0;
38406       if (out != 
38407   # 6497 "ssl/ssl_lib.c" 3 4
38408                 ((void *)0)
38409   # 6497 "ssl/ssl_lib.c"
38410                     )
38411           *out = sc->clienthello->random;
38412       return 32;
38413   }
38414   
38415   size_t SSL_client_hello_get0_session_id(SSL *s, const unsigned char **out)
38416   {
38417       const SSL_CONNECTION *sc = ((s) == 
38418   # 6504 "ssl/ssl_lib.c" 3 4
38419                                 ((void *)0) 
38420   # 6504 "ssl/ssl_lib.c"
38421                                 ? 
38422   # 6504 "ssl/ssl_lib.c" 3 4
38423                                 ((void *)0) 
38424   # 6504 "ssl/ssl_lib.c"
38425                                 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
38426   # 6504 "ssl/ssl_lib.c" 3 4
38427                                 ((void *)0)
38428   # 6504 "ssl/ssl_lib.c"
38429                                 )));
38430   
38431       if (sc == 
38432   # 6506 "ssl/ssl_lib.c" 3 4
38433                ((void *)0)
38434   # 6506 "ssl/ssl_lib.c"
38435                    )
38436           return 0;
38437   
38438       if (sc->clienthello == 
38439   # 6509 "ssl/ssl_lib.c" 3 4
38440                             ((void *)0)
38441   # 6509 "ssl/ssl_lib.c"
38442                                 )
38443           return 0;
38444       if (out != 
38445   # 6511 "ssl/ssl_lib.c" 3 4
38446                 ((void *)0)
38447   # 6511 "ssl/ssl_lib.c"
38448                     )
38449           *out = sc->clienthello->session_id;
38450       return sc->clienthello->session_id_len;
38451   }
38452   
38453   size_t SSL_client_hello_get0_ciphers(SSL *s, const unsigned char **out)
38454   {
38455       const SSL_CONNECTION *sc = ((s) == 
38456   # 6518 "ssl/ssl_lib.c" 3 4
38457                                 ((void *)0) 
38458   # 6518 "ssl/ssl_lib.c"
38459                                 ? 
38460   # 6518 "ssl/ssl_lib.c" 3 4
38461                                 ((void *)0) 
38462   # 6518 "ssl/ssl_lib.c"
38463                                 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
38464   # 6518 "ssl/ssl_lib.c" 3 4
38465                                 ((void *)0)
38466   # 6518 "ssl/ssl_lib.c"
38467                                 )));
38468   
38469       if (sc == 
38470   # 6520 "ssl/ssl_lib.c" 3 4
38471                ((void *)0)
38472   # 6520 "ssl/ssl_lib.c"
38473                    )
38474           return 0;
38475   
38476       if (sc->clienthello == 
38477   # 6523 "ssl/ssl_lib.c" 3 4
38478                             ((void *)0)
38479   # 6523 "ssl/ssl_lib.c"
38480                                 )
38481           return 0;
38482       if (out != 
38483   # 6525 "ssl/ssl_lib.c" 3 4
38484                 ((void *)0)
38485   # 6525 "ssl/ssl_lib.c"
38486                     )
38487           *out = PACKET_data(&sc->clienthello->ciphersuites);
38488       return PACKET_remaining(&sc->clienthello->ciphersuites);
38489   }
38490   
38491   size_t SSL_client_hello_get0_compression_methods(SSL *s, const unsigned char **out)
38492   {
38493       const SSL_CONNECTION *sc = ((s) == 
38494   # 6532 "ssl/ssl_lib.c" 3 4
38495                                 ((void *)0) 
38496   # 6532 "ssl/ssl_lib.c"
38497                                 ? 
38498   # 6532 "ssl/ssl_lib.c" 3 4
38499                                 ((void *)0) 
38500   # 6532 "ssl/ssl_lib.c"
38501                                 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
38502   # 6532 "ssl/ssl_lib.c" 3 4
38503                                 ((void *)0)
38504   # 6532 "ssl/ssl_lib.c"
38505                                 )));
38506   
38507       if (sc == 
38508   # 6534 "ssl/ssl_lib.c" 3 4
38509                ((void *)0)
38510   # 6534 "ssl/ssl_lib.c"
38511                    )
38512           return 0;
38513   
38514       if (sc->clienthello == 
38515   # 6537 "ssl/ssl_lib.c" 3 4
38516                             ((void *)0)
38517   # 6537 "ssl/ssl_lib.c"
38518                                 )
38519           return 0;
38520       if (out != 
38521   # 6539 "ssl/ssl_lib.c" 3 4
38522                 ((void *)0)
38523   # 6539 "ssl/ssl_lib.c"
38524                     )
38525           *out = sc->clienthello->compressions;
38526       return sc->clienthello->compressions_len;
38527   }
38528   
38529   int SSL_client_hello_get1_extensions_present(SSL *s, int **out, size_t *outlen)
38530   {
38531       RAW_EXTENSION *ext;
38532       int *present;
38533       size_t num = 0, i;
38534       const SSL_CONNECTION *sc = ((s) == 
38535   # 6549 "ssl/ssl_lib.c" 3 4
38536                                 ((void *)0) 
38537   # 6549 "ssl/ssl_lib.c"
38538                                 ? 
38539   # 6549 "ssl/ssl_lib.c" 3 4
38540                                 ((void *)0) 
38541   # 6549 "ssl/ssl_lib.c"
38542                                 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
38543   # 6549 "ssl/ssl_lib.c" 3 4
38544                                 ((void *)0)
38545   # 6549 "ssl/ssl_lib.c"
38546                                 )));
38547   
38548       if (sc == 
38549   # 6551 "ssl/ssl_lib.c" 3 4
38550                ((void *)0)
38551   # 6551 "ssl/ssl_lib.c"
38552                    )
38553           return 0;
38554   
38555       if (sc->clienthello == 
38556   # 6554 "ssl/ssl_lib.c" 3 4
38557                             ((void *)0) 
38558   # 6554 "ssl/ssl_lib.c"
38559                                  || out == 
38560   # 6554 "ssl/ssl_lib.c" 3 4
38561                                            ((void *)0) 
38562   # 6554 "ssl/ssl_lib.c"
38563                                                 || outlen == 
38564   # 6554 "ssl/ssl_lib.c" 3 4
38565                                                              ((void *)0)
38566   # 6554 "ssl/ssl_lib.c"
38567                                                                  )
38568           return 0;
38569       for (i = 0; i < sc->clienthello->pre_proc_exts_len; i++) {
38570           ext = sc->clienthello->pre_proc_exts + i;
38571           if (ext->present)
38572               num++;
38573       }
38574       if (num == 0) {
38575           *out = 
38576   # 6562 "ssl/ssl_lib.c" 3 4
38577                 ((void *)0)
38578   # 6562 "ssl/ssl_lib.c"
38579                     ;
38580           *outlen = 0;
38581           return 1;
38582       }
38583       if ((present = CRYPTO_malloc(sizeof(*present) * num, "ssl/ssl_lib.c", 6566)) == 
38584   # 6566 "ssl/ssl_lib.c" 3 4
38585                                                                ((void *)0)
38586   # 6566 "ssl/ssl_lib.c"
38587                                                                    )
38588           return 0;
38589       for (i = 0; i < sc->clienthello->pre_proc_exts_len; i++) {
38590           ext = sc->clienthello->pre_proc_exts + i;
38591           if (ext->present) {
38592               if (ext->received_order >= num)
38593                   goto err;
38594               present[ext->received_order] = ext->type;
38595           }
38596       }
38597       *out = present;
38598       *outlen = num;
38599       return 1;
38600    err:
38601       CRYPTO_free(present, "ssl/ssl_lib.c", 6580);
38602       return 0;
38603   }
38604   
38605   int SSL_client_hello_get_extension_order(SSL *s, uint16_t *exts, size_t *num_exts)
38606   {
38607       RAW_EXTENSION *ext;
38608       size_t num = 0, i;
38609       const SSL_CONNECTION *sc = ((s) == 
38610   # 6588 "ssl/ssl_lib.c" 3 4
38611                                 ((void *)0) 
38612   # 6588 "ssl/ssl_lib.c"
38613                                 ? 
38614   # 6588 "ssl/ssl_lib.c" 3 4
38615                                 ((void *)0) 
38616   # 6588 "ssl/ssl_lib.c"
38617                                 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
38618   # 6588 "ssl/ssl_lib.c" 3 4
38619                                 ((void *)0)
38620   # 6588 "ssl/ssl_lib.c"
38621                                 )));
38622   
38623       if (sc == 
38624   # 6590 "ssl/ssl_lib.c" 3 4
38625                ((void *)0)
38626   # 6590 "ssl/ssl_lib.c"
38627                    )
38628           return 0;
38629   
38630       if (sc->clienthello == 
38631   # 6593 "ssl/ssl_lib.c" 3 4
38632                             ((void *)0) 
38633   # 6593 "ssl/ssl_lib.c"
38634                                  || num_exts == 
38635   # 6593 "ssl/ssl_lib.c" 3 4
38636                                                 ((void *)0)
38637   # 6593 "ssl/ssl_lib.c"
38638                                                     )
38639           return 0;
38640       for (i = 0; i < sc->clienthello->pre_proc_exts_len; i++) {
38641           ext = sc->clienthello->pre_proc_exts + i;
38642           if (ext->present)
38643               num++;
38644       }
38645       if (num == 0) {
38646           *num_exts = 0;
38647           return 1;
38648       }
38649       if (exts == 
38650   # 6604 "ssl/ssl_lib.c" 3 4
38651                  ((void *)0)
38652   # 6604 "ssl/ssl_lib.c"
38653                      ) {
38654           *num_exts = num;
38655           return 1;
38656       }
38657       if (*num_exts < num)
38658           return 0;
38659       for (i = 0; i < sc->clienthello->pre_proc_exts_len; i++) {
38660           ext = sc->clienthello->pre_proc_exts + i;
38661           if (ext->present) {
38662               if (ext->received_order >= num)
38663                   return 0;
38664               exts[ext->received_order] = ext->type;
38665           }
38666       }
38667       *num_exts = num;
38668       return 1;
38669   }
38670   
38671   int SSL_client_hello_get0_ext(SSL *s, unsigned int type, const unsigned char **out,
38672                          size_t *outlen)
38673   {
38674       size_t i;
38675       RAW_EXTENSION *r;
38676       const SSL_CONNECTION *sc = ((s) == 
38677   # 6627 "ssl/ssl_lib.c" 3 4
38678                                 ((void *)0) 
38679   # 6627 "ssl/ssl_lib.c"
38680                                 ? 
38681   # 6627 "ssl/ssl_lib.c" 3 4
38682                                 ((void *)0) 
38683   # 6627 "ssl/ssl_lib.c"
38684                                 : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
38685   # 6627 "ssl/ssl_lib.c" 3 4
38686                                 ((void *)0)
38687   # 6627 "ssl/ssl_lib.c"
38688                                 )));
38689   
38690       if (sc == 
38691   # 6629 "ssl/ssl_lib.c" 3 4
38692                ((void *)0)
38693   # 6629 "ssl/ssl_lib.c"
38694                    )
38695           return 0;
38696   
38697       if (sc->clienthello == 
38698   # 6632 "ssl/ssl_lib.c" 3 4
38699                             ((void *)0)
38700   # 6632 "ssl/ssl_lib.c"
38701                                 )
38702           return 0;
38703       for (i = 0; i < sc->clienthello->pre_proc_exts_len; ++i) {
38704           r = sc->clienthello->pre_proc_exts + i;
38705           if (r->present && r->type == type) {
38706               if (out != 
38707   # 6637 "ssl/ssl_lib.c" 3 4
38708                         ((void *)0)
38709   # 6637 "ssl/ssl_lib.c"
38710                             )
38711                   *out = PACKET_data(&r->data);
38712               if (outlen != 
38713   # 6639 "ssl/ssl_lib.c" 3 4
38714                            ((void *)0)
38715   # 6639 "ssl/ssl_lib.c"
38716                                )
38717                   *outlen = PACKET_remaining(&r->data);
38718               return 1;
38719           }
38720       }
38721       return 0;
38722   }
38723   
38724   int SSL_free_buffers(SSL *ssl)
38725   {
38726       RECORD_LAYER *rl;
38727       SSL_CONNECTION *sc = ((ssl) == 
38728   # 6650 "ssl/ssl_lib.c" 3 4
38729                           ((void *)0) 
38730   # 6650 "ssl/ssl_lib.c"
38731                           ? 
38732   # 6650 "ssl/ssl_lib.c" 3 4
38733                           ((void *)0) 
38734   # 6650 "ssl/ssl_lib.c"
38735                           : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : 
38736   # 6650 "ssl/ssl_lib.c" 3 4
38737                           ((void *)0)
38738   # 6650 "ssl/ssl_lib.c"
38739                           ));
38740   
38741       if (sc == 
38742   # 6652 "ssl/ssl_lib.c" 3 4
38743                ((void *)0)
38744   # 6652 "ssl/ssl_lib.c"
38745                    )
38746           return 0;
38747   
38748       rl = &sc->rlayer;
38749   
38750       return rl->rrlmethod->free_buffers(rl->rrl)
38751              && rl->wrlmethod->free_buffers(rl->wrl);
38752   }
38753   
38754   int SSL_alloc_buffers(SSL *ssl)
38755   {
38756       RECORD_LAYER *rl;
38757       SSL_CONNECTION *sc = ((ssl) == 
38758   # 6664 "ssl/ssl_lib.c" 3 4
38759                           ((void *)0) 
38760   # 6664 "ssl/ssl_lib.c"
38761                           ? 
38762   # 6664 "ssl/ssl_lib.c" 3 4
38763                           ((void *)0) 
38764   # 6664 "ssl/ssl_lib.c"
38765                           : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls : 
38766   # 6664 "ssl/ssl_lib.c" 3 4
38767                           ((void *)0)
38768   # 6664 "ssl/ssl_lib.c"
38769                           )));
38770   
38771       if (sc == 
38772   # 6666 "ssl/ssl_lib.c" 3 4
38773                ((void *)0)
38774   # 6666 "ssl/ssl_lib.c"
38775                    )
38776           return 0;
38777   
38778   
38779       if (((ssl) != 
38780   # 6670 "ssl/ssl_lib.c" 3 4
38781          ((void *)0) 
38782   # 6670 "ssl/ssl_lib.c"
38783          && ((ssl)->type == 1 || (ssl)->type == 2)))
38784           return 1;
38785   
38786       rl = &sc->rlayer;
38787   
38788       return rl->rrlmethod->alloc_buffers(rl->rrl)
38789              && rl->wrlmethod->alloc_buffers(rl->wrl);
38790   }
38791   
38792   void SSL_CTX_set_keylog_callback(SSL_CTX *ctx, SSL_CTX_keylog_cb_func cb)
38793   {
38794       ctx->keylog_callback = cb;
38795   }
38796   
38797   SSL_CTX_keylog_cb_func SSL_CTX_get_keylog_callback(const SSL_CTX *ctx)
38798   {
38799       return ctx->keylog_callback;
38800   }
38801   
38802   static int nss_keylog_int(const char *prefix,
38803                             SSL_CONNECTION *sc,
38804                             const uint8_t *parameter_1,
38805                             size_t parameter_1_len,
38806                             const uint8_t *parameter_2,
38807                             size_t parameter_2_len)
38808   {
38809       char *out = 
38810   # 6696 "ssl/ssl_lib.c" 3 4
38811                  ((void *)0)
38812   # 6696 "ssl/ssl_lib.c"
38813                      ;
38814       char *cursor = 
38815   # 6697 "ssl/ssl_lib.c" 3 4
38816                     ((void *)0)
38817   # 6697 "ssl/ssl_lib.c"
38818                         ;
38819       size_t out_len = 0;
38820       size_t i;
38821       size_t prefix_len;
38822       SSL_CTX *sctx = ((sc)->ssl.ctx);
38823   
38824       if (sctx->keylog_callback == 
38825   # 6703 "ssl/ssl_lib.c" 3 4
38826                                   ((void *)0)
38827   # 6703 "ssl/ssl_lib.c"
38828                                       )
38829           return 1;
38830   # 6714 "ssl/ssl_lib.c"
38831       prefix_len = strlen(prefix);
38832       out_len = prefix_len + (2 * parameter_1_len) + (2 * parameter_2_len) + 3;
38833       if ((out = cursor = CRYPTO_malloc(out_len, "ssl/ssl_lib.c", 6716)) == 
38834   # 6716 "ssl/ssl_lib.c" 3 4
38835                                                      ((void *)0)
38836   # 6716 "ssl/ssl_lib.c"
38837                                                          )
38838           return 0;
38839   
38840       strcpy(cursor, prefix);
38841       cursor += prefix_len;
38842       *cursor++ = ' ';
38843   
38844       for (i = 0; i < parameter_1_len; i++) {
38845           sprintf(cursor, "%02x", parameter_1[i]);
38846           cursor += 2;
38847       }
38848       *cursor++ = ' ';
38849   
38850       for (i = 0; i < parameter_2_len; i++) {
38851           sprintf(cursor, "%02x", parameter_2[i]);
38852           cursor += 2;
38853       }
38854       *cursor = '\0';
38855   
38856       sctx->keylog_callback((&(sc)->ssl), (const char *)out);
38857       CRYPTO_clear_free(out, out_len, "ssl/ssl_lib.c", 6736);
38858       return 1;
38859   
38860   }
38861   
38862   int ssl_log_rsa_client_key_exchange(SSL_CONNECTION *sc,
38863                                       const uint8_t *encrypted_premaster,
38864                                       size_t encrypted_premaster_len,
38865                                       const uint8_t *premaster,
38866                                       size_t premaster_len)
38867   {
38868       if (encrypted_premaster_len < 8) {
38869           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6748, __func__), ossl_statem_fatal)((sc), (80), ((259|((0x1 << 18L)|(0x2 << 18L)))), 
38870   # 6748 "ssl/ssl_lib.c" 3 4
38871          ((void *)0)
38872   # 6748 "ssl/ssl_lib.c"
38873          );
38874           return 0;
38875       }
38876   
38877   
38878       return nss_keylog_int("RSA",
38879                             sc,
38880                             encrypted_premaster,
38881                             8,
38882                             premaster,
38883                             premaster_len);
38884   }
38885   
38886   int ssl_log_secret(SSL_CONNECTION *sc,
38887                      const char *label,
38888                      const uint8_t *secret,
38889                      size_t secret_len)
38890   {
38891       return nss_keylog_int(label,
38892                             sc,
38893                             sc->s3.client_random,
38894                             32,
38895                             secret,
38896                             secret_len);
38897   }
38898   
38899   
38900   
38901   int ssl_cache_cipherlist(SSL_CONNECTION *s, PACKET *cipher_suites, int sslv2format)
38902   {
38903       int n;
38904   
38905       n = sslv2format ? 3 : 2;
38906   
38907       if (PACKET_remaining(cipher_suites) == 0) {
38908           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6783, __func__), ossl_statem_fatal)((s), (47), (183), 
38909   # 6783 "ssl/ssl_lib.c" 3 4
38910          ((void *)0)
38911   # 6783 "ssl/ssl_lib.c"
38912          );
38913           return 0;
38914       }
38915   
38916       if (PACKET_remaining(cipher_suites) % n != 0) {
38917           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6788, __func__), ossl_statem_fatal)((s), (50), (151), 
38918   # 6788 "ssl/ssl_lib.c" 3 4
38919          ((void *)0)
38920   # 6788 "ssl/ssl_lib.c"
38921          );
38922           return 0;
38923       }
38924   
38925       CRYPTO_free(s->s3.tmp.ciphers_raw, "ssl/ssl_lib.c", 6792);
38926       s->s3.tmp.ciphers_raw = 
38927   # 6793 "ssl/ssl_lib.c" 3 4
38928                              ((void *)0)
38929   # 6793 "ssl/ssl_lib.c"
38930                                  ;
38931       s->s3.tmp.ciphers_rawlen = 0;
38932   
38933       if (sslv2format) {
38934           size_t numciphers = PACKET_remaining(cipher_suites) / n;
38935           PACKET sslv2ciphers = *cipher_suites;
38936           unsigned int leadbyte;
38937           unsigned char *raw;
38938   # 6809 "ssl/ssl_lib.c"
38939           raw = CRYPTO_malloc(numciphers * 2, "ssl/ssl_lib.c", 6809);
38940           s->s3.tmp.ciphers_raw = raw;
38941           if (raw == 
38942   # 6811 "ssl/ssl_lib.c" 3 4
38943                     ((void *)0)
38944   # 6811 "ssl/ssl_lib.c"
38945                         ) {
38946               (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6812, __func__), ossl_statem_fatal)((s), (80), ((15 | (0x2 << 18L))), 
38947   # 6812 "ssl/ssl_lib.c" 3 4
38948              ((void *)0)
38949   # 6812 "ssl/ssl_lib.c"
38950              );
38951               return 0;
38952           }
38953           for (s->s3.tmp.ciphers_rawlen = 0;
38954                PACKET_remaining(&sslv2ciphers) > 0;
38955                raw += 2) {
38956               if (!PACKET_get_1(&sslv2ciphers, &leadbyte)
38957                       || (leadbyte == 0
38958                           && !PACKET_copy_bytes(&sslv2ciphers, raw,
38959                                                 2))
38960                       || (leadbyte != 0
38961                           && !PACKET_forward(&sslv2ciphers, 2))) {
38962                   (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6824, __func__), ossl_statem_fatal)((s), (50), (240), 
38963   # 6824 "ssl/ssl_lib.c" 3 4
38964                  ((void *)0)
38965   # 6824 "ssl/ssl_lib.c"
38966                  );
38967                   CRYPTO_free(s->s3.tmp.ciphers_raw, "ssl/ssl_lib.c", 6825);
38968                   s->s3.tmp.ciphers_raw = 
38969   # 6826 "ssl/ssl_lib.c" 3 4
38970                                          ((void *)0)
38971   # 6826 "ssl/ssl_lib.c"
38972                                              ;
38973                   s->s3.tmp.ciphers_rawlen = 0;
38974                   return 0;
38975               }
38976               if (leadbyte == 0)
38977                   s->s3.tmp.ciphers_rawlen += 2;
38978           }
38979       } else if (!PACKET_memdup(cipher_suites, &s->s3.tmp.ciphers_raw,
38980                              &s->s3.tmp.ciphers_rawlen)) {
38981           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6835, __func__), ossl_statem_fatal)((s), (80), ((259|((0x1 << 18L)|(0x2 << 18L)))), 
38982   # 6835 "ssl/ssl_lib.c" 3 4
38983          ((void *)0)
38984   # 6835 "ssl/ssl_lib.c"
38985          );
38986           return 0;
38987       }
38988       return 1;
38989   }
38990   
38991   int SSL_bytes_to_cipher_list(SSL *s, const unsigned char *bytes, size_t len,
38992                                int isv2format, struct stack_st_SSL_CIPHER **sk,
38993                                struct stack_st_SSL_CIPHER **scsvs)
38994   {
38995       PACKET pkt;
38996       SSL_CONNECTION *sc = ((s) == 
38997   # 6846 "ssl/ssl_lib.c" 3 4
38998                           ((void *)0) 
38999   # 6846 "ssl/ssl_lib.c"
39000                           ? 
39001   # 6846 "ssl/ssl_lib.c" 3 4
39002                           ((void *)0) 
39003   # 6846 "ssl/ssl_lib.c"
39004                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
39005   # 6846 "ssl/ssl_lib.c" 3 4
39006                           ((void *)0)
39007   # 6846 "ssl/ssl_lib.c"
39008                           )));
39009   
39010       if (sc == 
39011   # 6848 "ssl/ssl_lib.c" 3 4
39012                ((void *)0)
39013   # 6848 "ssl/ssl_lib.c"
39014                    )
39015           return 0;
39016   
39017       if (!PACKET_buf_init(&pkt, bytes, len))
39018           return 0;
39019       return ossl_bytes_to_cipher_list(sc, &pkt, sk, scsvs, isv2format, 0);
39020   }
39021   
39022   int ossl_bytes_to_cipher_list(SSL_CONNECTION *s, PACKET *cipher_suites,
39023                                 struct stack_st_SSL_CIPHER **skp,
39024                                 struct stack_st_SSL_CIPHER **scsvs_out,
39025                                 int sslv2format, int fatal)
39026   {
39027       const SSL_CIPHER *c;
39028       struct stack_st_SSL_CIPHER *sk = 
39029   # 6862 "ssl/ssl_lib.c" 3 4
39030                                 ((void *)0)
39031   # 6862 "ssl/ssl_lib.c"
39032                                     ;
39033       struct stack_st_SSL_CIPHER *scsvs = 
39034   # 6863 "ssl/ssl_lib.c" 3 4
39035                                    ((void *)0)
39036   # 6863 "ssl/ssl_lib.c"
39037                                        ;
39038       int n;
39039   
39040       unsigned char cipher[3];
39041   
39042       n = sslv2format ? 3 : 2;
39043   
39044       if (PACKET_remaining(cipher_suites) == 0) {
39045           if (fatal)
39046               (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6872, __func__), ossl_statem_fatal)((s), (47), (183), 
39047   # 6872 "ssl/ssl_lib.c" 3 4
39048              ((void *)0)
39049   # 6872 "ssl/ssl_lib.c"
39050              );
39051           else
39052               (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6874,__func__), ERR_set_error)((20),(183),
39053   # 6874 "ssl/ssl_lib.c" 3 4
39054              ((void *)0)
39055   # 6874 "ssl/ssl_lib.c"
39056              );
39057           return 0;
39058       }
39059   
39060       if (PACKET_remaining(cipher_suites) % n != 0) {
39061           if (fatal)
39062               (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6880, __func__), ossl_statem_fatal)((s), (50), (151), 
39063   # 6880 "ssl/ssl_lib.c" 3 4
39064              ((void *)0)
39065   # 6880 "ssl/ssl_lib.c"
39066              )
39067                                                            ;
39068           else
39069               (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6883,__func__), ERR_set_error)((20),(151),
39070   # 6883 "ssl/ssl_lib.c" 3 4
39071              ((void *)0)
39072   # 6883 "ssl/ssl_lib.c"
39073              );
39074           return 0;
39075       }
39076   
39077       sk = ((struct stack_st_SSL_CIPHER *)OPENSSL_sk_new_null());
39078       scsvs = ((struct stack_st_SSL_CIPHER *)OPENSSL_sk_new_null());
39079       if (sk == 
39080   # 6889 "ssl/ssl_lib.c" 3 4
39081                ((void *)0) 
39082   # 6889 "ssl/ssl_lib.c"
39083                     || scsvs == 
39084   # 6889 "ssl/ssl_lib.c" 3 4
39085                                 ((void *)0)
39086   # 6889 "ssl/ssl_lib.c"
39087                                     ) {
39088           if (fatal)
39089               (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6891, __func__), ossl_statem_fatal)((s), (80), ((15 | (0x2 << 18L))), 
39090   # 6891 "ssl/ssl_lib.c" 3 4
39091              ((void *)0)
39092   # 6891 "ssl/ssl_lib.c"
39093              );
39094           else
39095               (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6893,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
39096   # 6893 "ssl/ssl_lib.c" 3 4
39097              ((void *)0)
39098   # 6893 "ssl/ssl_lib.c"
39099              );
39100           goto err;
39101       }
39102   
39103       while (PACKET_copy_bytes(cipher_suites, cipher, n)) {
39104   
39105   
39106   
39107   
39108   
39109           if (sslv2format && cipher[0] != '\0')
39110               continue;
39111   
39112   
39113           c = ssl_get_cipher_by_char(s, sslv2format ? &cipher[1] : cipher, 1);
39114           if (c != 
39115   # 6908 "ssl/ssl_lib.c" 3 4
39116                   ((void *)0)
39117   # 6908 "ssl/ssl_lib.c"
39118                       ) {
39119               if ((c->valid && !OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(c))) ||
39120                   (!c->valid && !OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(scsvs), ossl_check_SSL_CIPHER_type(c)))) {
39121                   if (fatal)
39122                       (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6912, __func__), ossl_statem_fatal)((s), (80), ((15 | (0x2 << 18L))), 
39123   # 6912 "ssl/ssl_lib.c" 3 4
39124                      ((void *)0)
39125   # 6912 "ssl/ssl_lib.c"
39126                      );
39127                   else
39128                       (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6914,__func__), ERR_set_error)((20),((15 | (0x2 << 18L))),
39129   # 6914 "ssl/ssl_lib.c" 3 4
39130                      ((void *)0)
39131   # 6914 "ssl/ssl_lib.c"
39132                      );
39133                   goto err;
39134               }
39135           }
39136       }
39137       if (PACKET_remaining(cipher_suites) > 0) {
39138           if (fatal)
39139               (ERR_new(), ERR_set_debug("ssl/ssl_lib.c", 6921, __func__), ossl_statem_fatal)((s), (50), (271), 
39140   # 6921 "ssl/ssl_lib.c" 3 4
39141              ((void *)0)
39142   # 6921 "ssl/ssl_lib.c"
39143              );
39144           else
39145               (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",6923,__func__), ERR_set_error)((20),(271),
39146   # 6923 "ssl/ssl_lib.c" 3 4
39147              ((void *)0)
39148   # 6923 "ssl/ssl_lib.c"
39149              );
39150           goto err;
39151       }
39152   
39153       if (skp != 
39154   # 6927 "ssl/ssl_lib.c" 3 4
39155                 ((void *)0)
39156   # 6927 "ssl/ssl_lib.c"
39157                     )
39158           *skp = sk;
39159       else
39160           OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk));
39161       if (scsvs_out != 
39162   # 6931 "ssl/ssl_lib.c" 3 4
39163                       ((void *)0)
39164   # 6931 "ssl/ssl_lib.c"
39165                           )
39166           *scsvs_out = scsvs;
39167       else
39168           OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(scsvs));
39169       return 1;
39170    err:
39171       OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk));
39172       OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(scsvs));
39173       return 0;
39174   }
39175   
39176   int SSL_CTX_set_max_early_data(SSL_CTX *ctx, uint32_t max_early_data)
39177   {
39178       ctx->max_early_data = max_early_data;
39179   
39180       return 1;
39181   }
39182   
39183   uint32_t SSL_CTX_get_max_early_data(const SSL_CTX *ctx)
39184   {
39185       return ctx->max_early_data;
39186   }
39187   
39188   int SSL_set_max_early_data(SSL *s, uint32_t max_early_data)
39189   {
39190       SSL_CONNECTION *sc = ((s) == 
39191   # 6956 "ssl/ssl_lib.c" 3 4
39192                           ((void *)0) 
39193   # 6956 "ssl/ssl_lib.c"
39194                           ? 
39195   # 6956 "ssl/ssl_lib.c" 3 4
39196                           ((void *)0) 
39197   # 6956 "ssl/ssl_lib.c"
39198                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : 
39199   # 6956 "ssl/ssl_lib.c" 3 4
39200                           ((void *)0)
39201   # 6956 "ssl/ssl_lib.c"
39202                           ));
39203   
39204       if (sc == 
39205   # 6958 "ssl/ssl_lib.c" 3 4
39206                ((void *)0)
39207   # 6958 "ssl/ssl_lib.c"
39208                    )
39209           return 0;
39210   
39211       sc->max_early_data = max_early_data;
39212   
39213       return 1;
39214   }
39215   
39216   uint32_t SSL_get_max_early_data(const SSL *s)
39217   {
39218       const SSL_CONNECTION *sc = ((s) == 
39219   # 6968 "ssl/ssl_lib.c" 3 4
39220                                 ((void *)0) 
39221   # 6968 "ssl/ssl_lib.c"
39222                                 ? 
39223   # 6968 "ssl/ssl_lib.c" 3 4
39224                                 ((void *)0) 
39225   # 6968 "ssl/ssl_lib.c"
39226                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
39227   # 6968 "ssl/ssl_lib.c" 3 4
39228                                 ((void *)0)
39229   # 6968 "ssl/ssl_lib.c"
39230                                 )));
39231   
39232       if (sc == 
39233   # 6970 "ssl/ssl_lib.c" 3 4
39234                ((void *)0)
39235   # 6970 "ssl/ssl_lib.c"
39236                    )
39237           return 0;
39238   
39239       return sc->max_early_data;
39240   }
39241   
39242   int SSL_CTX_set_recv_max_early_data(SSL_CTX *ctx, uint32_t recv_max_early_data)
39243   {
39244       ctx->recv_max_early_data = recv_max_early_data;
39245   
39246       return 1;
39247   }
39248   
39249   uint32_t SSL_CTX_get_recv_max_early_data(const SSL_CTX *ctx)
39250   {
39251       return ctx->recv_max_early_data;
39252   }
39253   
39254   int SSL_set_recv_max_early_data(SSL *s, uint32_t recv_max_early_data)
39255   {
39256       SSL_CONNECTION *sc = ((s) == 
39257   # 6990 "ssl/ssl_lib.c" 3 4
39258                           ((void *)0) 
39259   # 6990 "ssl/ssl_lib.c"
39260                           ? 
39261   # 6990 "ssl/ssl_lib.c" 3 4
39262                           ((void *)0) 
39263   # 6990 "ssl/ssl_lib.c"
39264                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : 
39265   # 6990 "ssl/ssl_lib.c" 3 4
39266                           ((void *)0)
39267   # 6990 "ssl/ssl_lib.c"
39268                           ));
39269   
39270       if (sc == 
39271   # 6992 "ssl/ssl_lib.c" 3 4
39272                ((void *)0)
39273   # 6992 "ssl/ssl_lib.c"
39274                    )
39275           return 0;
39276   
39277       sc->recv_max_early_data = recv_max_early_data;
39278   
39279       return 1;
39280   }
39281   
39282   uint32_t SSL_get_recv_max_early_data(const SSL *s)
39283   {
39284       const SSL_CONNECTION *sc = ((s) == 
39285   # 7002 "ssl/ssl_lib.c" 3 4
39286                                 ((void *)0) 
39287   # 7002 "ssl/ssl_lib.c"
39288                                 ? 
39289   # 7002 "ssl/ssl_lib.c" 3 4
39290                                 ((void *)0) 
39291   # 7002 "ssl/ssl_lib.c"
39292                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
39293   # 7002 "ssl/ssl_lib.c" 3 4
39294                                 ((void *)0)
39295   # 7002 "ssl/ssl_lib.c"
39296                                 )));
39297   
39298       if (sc == 
39299   # 7004 "ssl/ssl_lib.c" 3 4
39300                ((void *)0)
39301   # 7004 "ssl/ssl_lib.c"
39302                    )
39303           return 0;
39304   
39305       return sc->recv_max_early_data;
39306   }
39307   
39308    unsigned int ssl_get_max_send_fragment(const SSL_CONNECTION *sc)
39309   {
39310   
39311       if (sc->session != 
39312   # 7013 "ssl/ssl_lib.c" 3 4
39313                         ((void *)0) 
39314   # 7013 "ssl/ssl_lib.c"
39315                              && (((sc->session->ext.max_fragment_len_mode) >= 1) && ((sc->session->ext.max_fragment_len_mode) <= 4)))
39316           return (512U << (sc->session->ext.max_fragment_len_mode - 1));
39317   
39318   
39319       return sc->max_send_fragment;
39320   }
39321   
39322    unsigned int ssl_get_split_send_fragment(const SSL_CONNECTION *sc)
39323   {
39324   
39325       if (sc->session != 
39326   # 7023 "ssl/ssl_lib.c" 3 4
39327                         ((void *)0) 
39328   # 7023 "ssl/ssl_lib.c"
39329                              && (((sc->session->ext.max_fragment_len_mode) >= 1) && ((sc->session->ext.max_fragment_len_mode) <= 4))
39330           && sc->split_send_fragment > (512U << (sc->session->ext.max_fragment_len_mode - 1)))
39331           return (512U << (sc->session->ext.max_fragment_len_mode - 1));
39332   
39333   
39334       if (sc->split_send_fragment > sc->max_send_fragment)
39335           return sc->max_send_fragment;
39336   
39337   
39338       return sc->split_send_fragment;
39339   }
39340   
39341   int SSL_stateless(SSL *s)
39342   {
39343       int ret;
39344       SSL_CONNECTION *sc = ((s) == 
39345   # 7038 "ssl/ssl_lib.c" 3 4
39346                           ((void *)0) 
39347   # 7038 "ssl/ssl_lib.c"
39348                           ? 
39349   # 7038 "ssl/ssl_lib.c" 3 4
39350                           ((void *)0) 
39351   # 7038 "ssl/ssl_lib.c"
39352                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : 
39353   # 7038 "ssl/ssl_lib.c" 3 4
39354                           ((void *)0)
39355   # 7038 "ssl/ssl_lib.c"
39356                           ));
39357   
39358       if (sc == 
39359   # 7040 "ssl/ssl_lib.c" 3 4
39360                ((void *)0)
39361   # 7040 "ssl/ssl_lib.c"
39362                    )
39363           return 0;
39364   
39365   
39366       if (!SSL_clear(s))
39367           return 0;
39368   
39369       ERR_clear_error();
39370   
39371       sc->s3.flags |= 0x0800;
39372       ret = SSL_accept(s);
39373       sc->s3.flags &= ~0x0800;
39374   
39375       if (ret > 0 && sc->ext.cookieok)
39376           return 1;
39377   
39378       if (sc->hello_retry_request == SSL_HRR_PENDING && !ossl_statem_in_error(sc))
39379           return 0;
39380   
39381       return -1;
39382   }
39383   
39384   void SSL_CTX_set_post_handshake_auth(SSL_CTX *ctx, int val)
39385   {
39386       ctx->pha_enabled = val;
39387   }
39388   
39389   void SSL_set_post_handshake_auth(SSL *ssl, int val)
39390   {
39391       SSL_CONNECTION *sc = ((ssl) == 
39392   # 7069 "ssl/ssl_lib.c" 3 4
39393                           ((void *)0) 
39394   # 7069 "ssl/ssl_lib.c"
39395                           ? 
39396   # 7069 "ssl/ssl_lib.c" 3 4
39397                           ((void *)0) 
39398   # 7069 "ssl/ssl_lib.c"
39399                           : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : 
39400   # 7069 "ssl/ssl_lib.c" 3 4
39401                           ((void *)0)
39402   # 7069 "ssl/ssl_lib.c"
39403                           ));
39404   
39405       if (sc == 
39406   # 7071 "ssl/ssl_lib.c" 3 4
39407                ((void *)0)
39408   # 7071 "ssl/ssl_lib.c"
39409                    )
39410           return;
39411   
39412       sc->pha_enabled = val;
39413   }
39414   
39415   int SSL_verify_client_post_handshake(SSL *ssl)
39416   {
39417       SSL_CONNECTION *sc = ((ssl) == 
39418   # 7079 "ssl/ssl_lib.c" 3 4
39419                           ((void *)0) 
39420   # 7079 "ssl/ssl_lib.c"
39421                           ? 
39422   # 7079 "ssl/ssl_lib.c" 3 4
39423                           ((void *)0) 
39424   # 7079 "ssl/ssl_lib.c"
39425                           : ((ssl)->type == 0 ? ( SSL_CONNECTION *)(ssl) : ((ssl)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(ssl))->tls : 
39426   # 7079 "ssl/ssl_lib.c" 3 4
39427                           ((void *)0)
39428   # 7079 "ssl/ssl_lib.c"
39429                           )));
39430   
39431   
39432       if (((ssl) != 
39433   # 7082 "ssl/ssl_lib.c" 3 4
39434          ((void *)0) 
39435   # 7082 "ssl/ssl_lib.c"
39436          && ((ssl)->type == 1 || (ssl)->type == 2))) {
39437           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7083,__func__), ERR_set_error)((20),(266),
39438   # 7083 "ssl/ssl_lib.c" 3 4
39439          ((void *)0)
39440   # 7083 "ssl/ssl_lib.c"
39441          );
39442           return 0;
39443       }
39444   
39445   
39446       if (sc == 
39447   # 7088 "ssl/ssl_lib.c" 3 4
39448                ((void *)0)
39449   # 7088 "ssl/ssl_lib.c"
39450                    )
39451           return 0;
39452   
39453       if (!(!((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8) && (&(sc)->ssl)->method->version >= 0x0304 && (&(sc)->ssl)->method->version != 0x10000)) {
39454           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7092,__func__), ERR_set_error)((20),(266),
39455   # 7092 "ssl/ssl_lib.c" 3 4
39456          ((void *)0)
39457   # 7092 "ssl/ssl_lib.c"
39458          );
39459           return 0;
39460       }
39461       if (!sc->server) {
39462           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7096,__func__), ERR_set_error)((20),(284),
39463   # 7096 "ssl/ssl_lib.c" 3 4
39464          ((void *)0)
39465   # 7096 "ssl/ssl_lib.c"
39466          );
39467           return 0;
39468       }
39469   
39470       if (!SSL_is_init_finished(ssl)) {
39471           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7101,__func__), ERR_set_error)((20),(121),
39472   # 7101 "ssl/ssl_lib.c" 3 4
39473          ((void *)0)
39474   # 7101 "ssl/ssl_lib.c"
39475          );
39476           return 0;
39477       }
39478   
39479       switch (sc->post_handshake_auth) {
39480       case SSL_PHA_NONE:
39481           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7107,__func__), ERR_set_error)((20),(279),
39482   # 7107 "ssl/ssl_lib.c" 3 4
39483          ((void *)0)
39484   # 7107 "ssl/ssl_lib.c"
39485          );
39486           return 0;
39487       default:
39488       case SSL_PHA_EXT_SENT:
39489           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7111,__func__), ERR_set_error)((20),((259|((0x1 << 18L)|(0x2 << 18L)))),
39490   # 7111 "ssl/ssl_lib.c" 3 4
39491          ((void *)0)
39492   # 7111 "ssl/ssl_lib.c"
39493          );
39494           return 0;
39495       case SSL_PHA_EXT_RECEIVED:
39496           break;
39497       case SSL_PHA_REQUEST_PENDING:
39498           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7116,__func__), ERR_set_error)((20),(285),
39499   # 7116 "ssl/ssl_lib.c" 3 4
39500          ((void *)0)
39501   # 7116 "ssl/ssl_lib.c"
39502          );
39503           return 0;
39504       case SSL_PHA_REQUESTED:
39505           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7119,__func__), ERR_set_error)((20),(286),
39506   # 7119 "ssl/ssl_lib.c" 3 4
39507          ((void *)0)
39508   # 7119 "ssl/ssl_lib.c"
39509          );
39510           return 0;
39511       }
39512   
39513       sc->post_handshake_auth = SSL_PHA_REQUEST_PENDING;
39514   
39515   
39516       if (!send_certificate_request(sc)) {
39517           sc->post_handshake_auth = SSL_PHA_EXT_RECEIVED;
39518           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7128,__func__), ERR_set_error)((20),(283),
39519   # 7128 "ssl/ssl_lib.c" 3 4
39520          ((void *)0)
39521   # 7128 "ssl/ssl_lib.c"
39522          );
39523           return 0;
39524       }
39525   
39526       ossl_statem_set_in_init(sc, 1);
39527       return 1;
39528   }
39529   
39530   int SSL_CTX_set_session_ticket_cb(SSL_CTX *ctx,
39531                                     SSL_CTX_generate_session_ticket_fn gen_cb,
39532                                     SSL_CTX_decrypt_session_ticket_fn dec_cb,
39533                                     void *arg)
39534   {
39535       ctx->generate_ticket_cb = gen_cb;
39536       ctx->decrypt_ticket_cb = dec_cb;
39537       ctx->ticket_cb_data = arg;
39538       return 1;
39539   }
39540   
39541   void SSL_CTX_set_allow_early_data_cb(SSL_CTX *ctx,
39542                                        SSL_allow_early_data_cb_fn cb,
39543                                        void *arg)
39544   {
39545       ctx->allow_early_data_cb = cb;
39546       ctx->allow_early_data_cb_data = arg;
39547   }
39548   
39549   void SSL_set_allow_early_data_cb(SSL *s,
39550                                    SSL_allow_early_data_cb_fn cb,
39551                                    void *arg)
39552   {
39553       SSL_CONNECTION *sc = ((s) == 
39554   # 7159 "ssl/ssl_lib.c" 3 4
39555                           ((void *)0) 
39556   # 7159 "ssl/ssl_lib.c"
39557                           ? 
39558   # 7159 "ssl/ssl_lib.c" 3 4
39559                           ((void *)0) 
39560   # 7159 "ssl/ssl_lib.c"
39561                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : 
39562   # 7159 "ssl/ssl_lib.c" 3 4
39563                           ((void *)0)
39564   # 7159 "ssl/ssl_lib.c"
39565                           ));
39566   
39567       if (sc == 
39568   # 7161 "ssl/ssl_lib.c" 3 4
39569                ((void *)0)
39570   # 7161 "ssl/ssl_lib.c"
39571                    )
39572           return;
39573   
39574       sc->allow_early_data_cb = cb;
39575       sc->allow_early_data_cb_data = arg;
39576   }
39577   
39578   const EVP_CIPHER *ssl_evp_cipher_fetch(OSSL_LIB_CTX *libctx,
39579                                          int nid,
39580                                          const char *properties)
39581   {
39582       const EVP_CIPHER *ciph;
39583   
39584       ciph = tls_get_cipher_from_engine(nid);
39585       if (ciph != 
39586   # 7175 "ssl/ssl_lib.c" 3 4
39587                  ((void *)0)
39588   # 7175 "ssl/ssl_lib.c"
39589                      )
39590           return ciph;
39591   
39592   
39593   
39594   
39595   
39596       ERR_set_mark();
39597       ciph = EVP_CIPHER_fetch(libctx, OBJ_nid2sn(nid), properties);
39598       ERR_pop_to_mark();
39599       return ciph;
39600   }
39601   
39602   
39603   int ssl_evp_cipher_up_ref(const EVP_CIPHER *cipher)
39604   {
39605   
39606       if (EVP_CIPHER_get0_provider(cipher) == 
39607   # 7192 "ssl/ssl_lib.c" 3 4
39608                                              ((void *)0)
39609   # 7192 "ssl/ssl_lib.c"
39610                                                  )
39611           return 1;
39612   
39613   
39614   
39615   
39616   
39617       return EVP_CIPHER_up_ref((EVP_CIPHER *)cipher);
39618   }
39619   
39620   void ssl_evp_cipher_free(const EVP_CIPHER *cipher)
39621   {
39622       if (cipher == 
39623   # 7204 "ssl/ssl_lib.c" 3 4
39624                    ((void *)0)
39625   # 7204 "ssl/ssl_lib.c"
39626                        )
39627           return;
39628   
39629       if (EVP_CIPHER_get0_provider(cipher) != 
39630   # 7207 "ssl/ssl_lib.c" 3 4
39631                                              ((void *)0)
39632   # 7207 "ssl/ssl_lib.c"
39633                                                  ) {
39634   
39635   
39636   
39637   
39638           EVP_CIPHER_free((EVP_CIPHER *)cipher);
39639       }
39640   }
39641   
39642   const EVP_MD *ssl_evp_md_fetch(OSSL_LIB_CTX *libctx,
39643                                  int nid,
39644                                  const char *properties)
39645   {
39646       const EVP_MD *md;
39647   
39648       md = tls_get_digest_from_engine(nid);
39649       if (md != 
39650   # 7223 "ssl/ssl_lib.c" 3 4
39651                ((void *)0)
39652   # 7223 "ssl/ssl_lib.c"
39653                    )
39654           return md;
39655   
39656   
39657       ERR_set_mark();
39658       md = EVP_MD_fetch(libctx, OBJ_nid2sn(nid), properties);
39659       ERR_pop_to_mark();
39660       return md;
39661   }
39662   
39663   int ssl_evp_md_up_ref(const EVP_MD *md)
39664   {
39665   
39666       if (EVP_MD_get0_provider(md) == 
39667   # 7236 "ssl/ssl_lib.c" 3 4
39668                                      ((void *)0)
39669   # 7236 "ssl/ssl_lib.c"
39670                                          )
39671           return 1;
39672   
39673   
39674   
39675   
39676   
39677       return EVP_MD_up_ref((EVP_MD *)md);
39678   }
39679   
39680   void ssl_evp_md_free(const EVP_MD *md)
39681   {
39682       if (md == 
39683   # 7248 "ssl/ssl_lib.c" 3 4
39684                ((void *)0)
39685   # 7248 "ssl/ssl_lib.c"
39686                    )
39687           return;
39688   
39689       if (EVP_MD_get0_provider(md) != 
39690   # 7251 "ssl/ssl_lib.c" 3 4
39691                                      ((void *)0)
39692   # 7251 "ssl/ssl_lib.c"
39693                                          ) {
39694   
39695   
39696   
39697   
39698           EVP_MD_free((EVP_MD *)md);
39699       }
39700   }
39701   
39702   int SSL_set0_tmp_dh_pkey(SSL *s, EVP_PKEY *dhpkey)
39703   {
39704       SSL_CONNECTION *sc = ((s) == 
39705   # 7262 "ssl/ssl_lib.c" 3 4
39706                           ((void *)0) 
39707   # 7262 "ssl/ssl_lib.c"
39708                           ? 
39709   # 7262 "ssl/ssl_lib.c" 3 4
39710                           ((void *)0) 
39711   # 7262 "ssl/ssl_lib.c"
39712                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
39713   # 7262 "ssl/ssl_lib.c" 3 4
39714                           ((void *)0)
39715   # 7262 "ssl/ssl_lib.c"
39716                           )));
39717   
39718       if (sc == 
39719   # 7264 "ssl/ssl_lib.c" 3 4
39720                ((void *)0)
39721   # 7264 "ssl/ssl_lib.c"
39722                    )
39723           return 0;
39724   
39725       if (!ssl_security(sc, (7 | (4 << 16)),
39726                         EVP_PKEY_get_security_bits(dhpkey), 0, dhpkey)) {
39727           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7269,__func__), ERR_set_error)((20),(394),
39728   # 7269 "ssl/ssl_lib.c" 3 4
39729          ((void *)0)
39730   # 7269 "ssl/ssl_lib.c"
39731          );
39732           return 0;
39733       }
39734       EVP_PKEY_free(sc->cert->dh_tmp);
39735       sc->cert->dh_tmp = dhpkey;
39736       return 1;
39737   }
39738   
39739   int SSL_CTX_set0_tmp_dh_pkey(SSL_CTX *ctx, EVP_PKEY *dhpkey)
39740   {
39741       if (!ssl_ctx_security(ctx, (7 | (4 << 16)),
39742                             EVP_PKEY_get_security_bits(dhpkey), 0, dhpkey)) {
39743           (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7281,__func__), ERR_set_error)((20),(394),
39744   # 7281 "ssl/ssl_lib.c" 3 4
39745          ((void *)0)
39746   # 7281 "ssl/ssl_lib.c"
39747          );
39748           return 0;
39749       }
39750       EVP_PKEY_free(ctx->cert->dh_tmp);
39751       ctx->cert->dh_tmp = dhpkey;
39752       return 1;
39753   }
39754   
39755   
39756   int SSL_handle_events(SSL *s)
39757   {
39758       SSL_CONNECTION *sc;
39759   
39760   
39761       if (((s) != 
39762   # 7295 "ssl/ssl_lib.c" 3 4
39763          ((void *)0) 
39764   # 7295 "ssl/ssl_lib.c"
39765          && ((s)->type == 1 || (s)->type == 2)))
39766           return ossl_quic_handle_events(s);
39767   
39768   
39769       sc = ((s) == 
39770   # 7299 "ssl/ssl_lib.c" 3 4
39771           ((void *)0) 
39772   # 7299 "ssl/ssl_lib.c"
39773           ? 
39774   # 7299 "ssl/ssl_lib.c" 3 4
39775           ((void *)0) 
39776   # 7299 "ssl/ssl_lib.c"
39777           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : 
39778   # 7299 "ssl/ssl_lib.c" 3 4
39779           ((void *)0)
39780   # 7299 "ssl/ssl_lib.c"
39781           ));
39782       if (sc != 
39783   # 7300 "ssl/ssl_lib.c" 3 4
39784                ((void *)0) 
39785   # 7300 "ssl/ssl_lib.c"
39786                     && ((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8))
39787   # 7309 "ssl/ssl_lib.c"
39788           return SSL_ctrl(s,74,0, 
39789   # 7309 "ssl/ssl_lib.c" 3 4
39790                 ((void *)0)
39791   # 7309 "ssl/ssl_lib.c"
39792                 ) >= 0;
39793   
39794       return 1;
39795   }
39796   
39797   int SSL_get_event_timeout(SSL *s, struct timeval *tv, int *is_infinite)
39798   {
39799       SSL_CONNECTION *sc;
39800   
39801   
39802       if (((s) != 
39803   # 7319 "ssl/ssl_lib.c" 3 4
39804          ((void *)0) 
39805   # 7319 "ssl/ssl_lib.c"
39806          && ((s)->type == 1 || (s)->type == 2)))
39807           return ossl_quic_get_event_timeout(s, tv, is_infinite);
39808   
39809   
39810       sc = ((s) == 
39811   # 7323 "ssl/ssl_lib.c" 3 4
39812           ((void *)0) 
39813   # 7323 "ssl/ssl_lib.c"
39814           ? 
39815   # 7323 "ssl/ssl_lib.c" 3 4
39816           ((void *)0) 
39817   # 7323 "ssl/ssl_lib.c"
39818           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : 
39819   # 7323 "ssl/ssl_lib.c" 3 4
39820           ((void *)0)
39821   # 7323 "ssl/ssl_lib.c"
39822           ));
39823       if (sc != 
39824   # 7324 "ssl/ssl_lib.c" 3 4
39825                ((void *)0) 
39826   # 7324 "ssl/ssl_lib.c"
39827                     && ((&(sc)->ssl)->method->ssl3_enc->enc_flags & 0x8)
39828           && SSL_ctrl(s,73,0, (void *)(tv))) {
39829           *is_infinite = 0;
39830           return 1;
39831       }
39832   
39833       tv->tv_sec = 1000000;
39834       tv->tv_usec = 0;
39835       *is_infinite = 1;
39836       return 1;
39837   }
39838   
39839   int SSL_get_rpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *desc)
39840   {
39841       SSL_CONNECTION *sc = ((s) == 
39842   # 7338 "ssl/ssl_lib.c" 3 4
39843                           ((void *)0) 
39844   # 7338 "ssl/ssl_lib.c"
39845                           ? 
39846   # 7338 "ssl/ssl_lib.c" 3 4
39847                           ((void *)0) 
39848   # 7338 "ssl/ssl_lib.c"
39849                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
39850   # 7338 "ssl/ssl_lib.c" 3 4
39851                           ((void *)0)
39852   # 7338 "ssl/ssl_lib.c"
39853                           )));
39854   
39855   
39856       if (((s) != 
39857   # 7341 "ssl/ssl_lib.c" 3 4
39858          ((void *)0) 
39859   # 7341 "ssl/ssl_lib.c"
39860          && ((s)->type == 1 || (s)->type == 2)))
39861           return ossl_quic_get_rpoll_descriptor(s, desc);
39862   
39863   
39864       if (sc == 
39865   # 7345 "ssl/ssl_lib.c" 3 4
39866                ((void *)0) 
39867   # 7345 "ssl/ssl_lib.c"
39868                     || sc->rbio == 
39869   # 7345 "ssl/ssl_lib.c" 3 4
39870                                    ((void *)0)
39871   # 7345 "ssl/ssl_lib.c"
39872                                        )
39873           return 0;
39874   
39875       return BIO_get_rpoll_descriptor(sc->rbio, desc);
39876   }
39877   
39878   int SSL_get_wpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *desc)
39879   {
39880       SSL_CONNECTION *sc = ((s) == 
39881   # 7353 "ssl/ssl_lib.c" 3 4
39882                           ((void *)0) 
39883   # 7353 "ssl/ssl_lib.c"
39884                           ? 
39885   # 7353 "ssl/ssl_lib.c" 3 4
39886                           ((void *)0) 
39887   # 7353 "ssl/ssl_lib.c"
39888                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
39889   # 7353 "ssl/ssl_lib.c" 3 4
39890                           ((void *)0)
39891   # 7353 "ssl/ssl_lib.c"
39892                           )));
39893   
39894   
39895       if (((s) != 
39896   # 7356 "ssl/ssl_lib.c" 3 4
39897          ((void *)0) 
39898   # 7356 "ssl/ssl_lib.c"
39899          && ((s)->type == 1 || (s)->type == 2)))
39900           return ossl_quic_get_wpoll_descriptor(s, desc);
39901   
39902   
39903       if (sc == 
39904   # 7360 "ssl/ssl_lib.c" 3 4
39905                ((void *)0) 
39906   # 7360 "ssl/ssl_lib.c"
39907                     || sc->wbio == 
39908   # 7360 "ssl/ssl_lib.c" 3 4
39909                                    ((void *)0)
39910   # 7360 "ssl/ssl_lib.c"
39911                                        )
39912           return 0;
39913   
39914       return BIO_get_wpoll_descriptor(sc->wbio, desc);
39915   }
39916   
39917   int SSL_net_read_desired(SSL *s)
39918   {
39919   
39920       if (!((s) != 
39921   # 7369 "ssl/ssl_lib.c" 3 4
39922           ((void *)0) 
39923   # 7369 "ssl/ssl_lib.c"
39924           && ((s)->type == 1 || (s)->type == 2)))
39925           return (SSL_want(s) == 3);
39926   
39927       return ossl_quic_get_net_read_desired(s);
39928   
39929   
39930   
39931   }
39932   
39933   int SSL_net_write_desired(SSL *s)
39934   {
39935   
39936       if (!((s) != 
39937   # 7381 "ssl/ssl_lib.c" 3 4
39938           ((void *)0) 
39939   # 7381 "ssl/ssl_lib.c"
39940           && ((s)->type == 1 || (s)->type == 2)))
39941           return (SSL_want(s) == 2);
39942   
39943       return ossl_quic_get_net_write_desired(s);
39944   
39945   
39946   
39947   }
39948   
39949   int SSL_set_blocking_mode(SSL *s, int blocking)
39950   {
39951   
39952       if (!((s) != 
39953   # 7393 "ssl/ssl_lib.c" 3 4
39954           ((void *)0) 
39955   # 7393 "ssl/ssl_lib.c"
39956           && ((s)->type == 1 || (s)->type == 2)))
39957           return 0;
39958   
39959       return ossl_quic_conn_set_blocking_mode(s, blocking);
39960   
39961   
39962   
39963   }
39964   
39965   int SSL_get_blocking_mode(SSL *s)
39966   {
39967   
39968       if (!((s) != 
39969   # 7405 "ssl/ssl_lib.c" 3 4
39970           ((void *)0) 
39971   # 7405 "ssl/ssl_lib.c"
39972           && ((s)->type == 1 || (s)->type == 2)))
39973           return -1;
39974   
39975       return ossl_quic_conn_get_blocking_mode(s);
39976   
39977   
39978   
39979   }
39980   
39981   int SSL_set1_initial_peer_addr(SSL *s, const BIO_ADDR *peer_addr)
39982   {
39983   
39984       if (!((s) != 
39985   # 7417 "ssl/ssl_lib.c" 3 4
39986           ((void *)0) 
39987   # 7417 "ssl/ssl_lib.c"
39988           && ((s)->type == 1 || (s)->type == 2)))
39989           return 0;
39990   
39991       return ossl_quic_conn_set_initial_peer_addr(s, peer_addr);
39992   
39993   
39994   
39995   }
39996   
39997   int SSL_shutdown_ex(SSL *ssl, uint64_t flags,
39998                       const SSL_SHUTDOWN_EX_ARGS *args,
39999                       size_t args_len)
40000   {
40001   
40002       if (!((ssl) != 
40003   # 7431 "ssl/ssl_lib.c" 3 4
40004           ((void *)0) 
40005   # 7431 "ssl/ssl_lib.c"
40006           && ((ssl)->type == 1 || (ssl)->type == 2)))
40007           return SSL_shutdown(ssl);
40008   
40009       return ossl_quic_conn_shutdown(ssl, flags, args, args_len);
40010   
40011   
40012   
40013   }
40014   
40015   int SSL_stream_conclude(SSL *ssl, uint64_t flags)
40016   {
40017   
40018       if (!((ssl) != 
40019   # 7443 "ssl/ssl_lib.c" 3 4
40020           ((void *)0) 
40021   # 7443 "ssl/ssl_lib.c"
40022           && ((ssl)->type == 1 || (ssl)->type == 2)))
40023           return 0;
40024   
40025       return ossl_quic_conn_stream_conclude(ssl);
40026   
40027   
40028   
40029   }
40030   
40031   SSL *SSL_new_stream(SSL *s, uint64_t flags)
40032   {
40033   
40034       if (!((s) != 
40035   # 7455 "ssl/ssl_lib.c" 3 4
40036           ((void *)0) 
40037   # 7455 "ssl/ssl_lib.c"
40038           && ((s)->type == 1 || (s)->type == 2)))
40039           return 
40040   # 7456 "ssl/ssl_lib.c" 3 4
40041                 ((void *)0)
40042   # 7456 "ssl/ssl_lib.c"
40043                     ;
40044   
40045       return ossl_quic_conn_stream_new(s, flags);
40046   
40047   
40048   
40049   }
40050   
40051   SSL *SSL_get0_connection(SSL *s)
40052   {
40053   
40054       if (!((s) != 
40055   # 7467 "ssl/ssl_lib.c" 3 4
40056           ((void *)0) 
40057   # 7467 "ssl/ssl_lib.c"
40058           && ((s)->type == 1 || (s)->type == 2)))
40059           return s;
40060   
40061       return ossl_quic_get0_connection(s);
40062   
40063   
40064   
40065   }
40066   
40067   int SSL_is_connection(SSL *s)
40068   {
40069       return SSL_get0_connection(s) == s;
40070   }
40071   
40072   int SSL_get_stream_type(SSL *s)
40073   {
40074   
40075       if (!((s) != 
40076   # 7484 "ssl/ssl_lib.c" 3 4
40077           ((void *)0) 
40078   # 7484 "ssl/ssl_lib.c"
40079           && ((s)->type == 1 || (s)->type == 2)))
40080           return ((1U << 0) | (1U << 1));
40081   
40082       return ossl_quic_get_stream_type(s);
40083   
40084   
40085   
40086   }
40087   
40088   uint64_t SSL_get_stream_id(SSL *s)
40089   {
40090   
40091       if (!((s) != 
40092   # 7496 "ssl/ssl_lib.c" 3 4
40093           ((void *)0) 
40094   # 7496 "ssl/ssl_lib.c"
40095           && ((s)->type == 1 || (s)->type == 2)))
40096           return 
40097   # 7497 "ssl/ssl_lib.c" 3 4
40098                 (18446744073709551615UL)
40099   # 7497 "ssl/ssl_lib.c"
40100                           ;
40101   
40102       return ossl_quic_get_stream_id(s);
40103   
40104   
40105   
40106   }
40107   
40108   int SSL_is_stream_local(SSL *s)
40109   {
40110   
40111       if (!((s) != 
40112   # 7508 "ssl/ssl_lib.c" 3 4
40113           ((void *)0) 
40114   # 7508 "ssl/ssl_lib.c"
40115           && ((s)->type == 1 || (s)->type == 2)))
40116           return -1;
40117   
40118       return ossl_quic_is_stream_local(s);
40119   
40120   
40121   
40122   }
40123   
40124   int SSL_set_default_stream_mode(SSL *s, uint32_t mode)
40125   {
40126   
40127       if (!((s) != 
40128   # 7520 "ssl/ssl_lib.c" 3 4
40129           ((void *)0) 
40130   # 7520 "ssl/ssl_lib.c"
40131           && ((s)->type == 1 || (s)->type == 2)))
40132           return 0;
40133   
40134       return ossl_quic_set_default_stream_mode(s, mode);
40135   
40136   
40137   
40138   }
40139   
40140   int SSL_set_incoming_stream_policy(SSL *s, int policy, uint64_t aec)
40141   {
40142   
40143       if (!((s) != 
40144   # 7532 "ssl/ssl_lib.c" 3 4
40145           ((void *)0) 
40146   # 7532 "ssl/ssl_lib.c"
40147           && ((s)->type == 1 || (s)->type == 2)))
40148           return 0;
40149   
40150       return ossl_quic_set_incoming_stream_policy(s, policy, aec);
40151   
40152   
40153   
40154   }
40155   
40156   SSL *SSL_accept_stream(SSL *s, uint64_t flags)
40157   {
40158   
40159       if (!((s) != 
40160   # 7544 "ssl/ssl_lib.c" 3 4
40161           ((void *)0) 
40162   # 7544 "ssl/ssl_lib.c"
40163           && ((s)->type == 1 || (s)->type == 2)))
40164           return 
40165   # 7545 "ssl/ssl_lib.c" 3 4
40166                 ((void *)0)
40167   # 7545 "ssl/ssl_lib.c"
40168                     ;
40169   
40170       return ossl_quic_accept_stream(s, flags);
40171   
40172   
40173   
40174   }
40175   
40176   size_t SSL_get_accept_stream_queue_len(SSL *s)
40177   {
40178   
40179       if (!((s) != 
40180   # 7556 "ssl/ssl_lib.c" 3 4
40181           ((void *)0) 
40182   # 7556 "ssl/ssl_lib.c"
40183           && ((s)->type == 1 || (s)->type == 2)))
40184           return 0;
40185   
40186       return ossl_quic_get_accept_stream_queue_len(s);
40187   
40188   
40189   
40190   }
40191   
40192   int SSL_stream_reset(SSL *s,
40193                        const SSL_STREAM_RESET_ARGS *args,
40194                        size_t args_len)
40195   {
40196   
40197       if (!((s) != 
40198   # 7570 "ssl/ssl_lib.c" 3 4
40199           ((void *)0) 
40200   # 7570 "ssl/ssl_lib.c"
40201           && ((s)->type == 1 || (s)->type == 2)))
40202           return 0;
40203   
40204       return ossl_quic_stream_reset(s, args, args_len);
40205   
40206   
40207   
40208   }
40209   
40210   int SSL_get_stream_read_state(SSL *s)
40211   {
40212   
40213       if (!((s) != 
40214   # 7582 "ssl/ssl_lib.c" 3 4
40215           ((void *)0) 
40216   # 7582 "ssl/ssl_lib.c"
40217           && ((s)->type == 1 || (s)->type == 2)))
40218           return 0;
40219   
40220       return ossl_quic_get_stream_read_state(s);
40221   
40222   
40223   
40224   }
40225   
40226   int SSL_get_stream_write_state(SSL *s)
40227   {
40228   
40229       if (!((s) != 
40230   # 7594 "ssl/ssl_lib.c" 3 4
40231           ((void *)0) 
40232   # 7594 "ssl/ssl_lib.c"
40233           && ((s)->type == 1 || (s)->type == 2)))
40234           return 0;
40235   
40236       return ossl_quic_get_stream_write_state(s);
40237   
40238   
40239   
40240   }
40241   
40242   int SSL_get_stream_read_error_code(SSL *s, uint64_t *app_error_code)
40243   {
40244   
40245       if (!((s) != 
40246   # 7606 "ssl/ssl_lib.c" 3 4
40247           ((void *)0) 
40248   # 7606 "ssl/ssl_lib.c"
40249           && ((s)->type == 1 || (s)->type == 2)))
40250           return -1;
40251   
40252       return ossl_quic_get_stream_read_error_code(s, app_error_code);
40253   
40254   
40255   
40256   }
40257   
40258   int SSL_get_stream_write_error_code(SSL *s, uint64_t *app_error_code)
40259   {
40260   
40261       if (!((s) != 
40262   # 7618 "ssl/ssl_lib.c" 3 4
40263           ((void *)0) 
40264   # 7618 "ssl/ssl_lib.c"
40265           && ((s)->type == 1 || (s)->type == 2)))
40266           return -1;
40267   
40268       return ossl_quic_get_stream_write_error_code(s, app_error_code);
40269   
40270   
40271   
40272   }
40273   
40274   int SSL_get_conn_close_info(SSL *s, SSL_CONN_CLOSE_INFO *info,
40275                               size_t info_len)
40276   {
40277   
40278       if (!((s) != 
40279   # 7631 "ssl/ssl_lib.c" 3 4
40280           ((void *)0) 
40281   # 7631 "ssl/ssl_lib.c"
40282           && ((s)->type == 1 || (s)->type == 2)))
40283           return -1;
40284   
40285       return ossl_quic_get_conn_close_info(s, info, info_len);
40286   
40287   
40288   
40289   }
40290   
40291   int SSL_get_value_uint(SSL *s, uint32_t class_, uint32_t id,
40292                          uint64_t *value)
40293   {
40294   
40295       if (((s) != 
40296   # 7644 "ssl/ssl_lib.c" 3 4
40297          ((void *)0) 
40298   # 7644 "ssl/ssl_lib.c"
40299          && ((s)->type == 1 || (s)->type == 2)))
40300           return ossl_quic_get_value_uint(s, class_, id, value);
40301   
40302   
40303       (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7648,__func__), ERR_set_error)((20),(258),
40304   # 7648 "ssl/ssl_lib.c" 3 4
40305      ((void *)0)
40306   # 7648 "ssl/ssl_lib.c"
40307      );
40308       return 0;
40309   }
40310   
40311   int SSL_set_value_uint(SSL *s, uint32_t class_, uint32_t id,
40312                          uint64_t value)
40313   {
40314   
40315       if (((s) != 
40316   # 7656 "ssl/ssl_lib.c" 3 4
40317          ((void *)0) 
40318   # 7656 "ssl/ssl_lib.c"
40319          && ((s)->type == 1 || (s)->type == 2)))
40320           return ossl_quic_set_value_uint(s, class_, id, value);
40321   
40322   
40323       (ERR_new(), ERR_set_debug("ssl/ssl_lib.c",7660,__func__), ERR_set_error)((20),(258),
40324   # 7660 "ssl/ssl_lib.c" 3 4
40325      ((void *)0)
40326   # 7660 "ssl/ssl_lib.c"
40327      );
40328       return 0;
40329   }
40330   
40331   int SSL_add_expected_rpk(SSL *s, EVP_PKEY *rpk)
40332   {
40333       unsigned char *data = 
40334   # 7666 "ssl/ssl_lib.c" 3 4
40335                            ((void *)0)
40336   # 7666 "ssl/ssl_lib.c"
40337                                ;
40338       SSL_DANE *dane = SSL_get0_dane(s);
40339       int ret;
40340   
40341       if (dane == 
40342   # 7670 "ssl/ssl_lib.c" 3 4
40343                  ((void *)0) 
40344   # 7670 "ssl/ssl_lib.c"
40345                       || dane->dctx == 
40346   # 7670 "ssl/ssl_lib.c" 3 4
40347                                        ((void *)0)
40348   # 7670 "ssl/ssl_lib.c"
40349                                            )
40350           return 0;
40351       if ((ret = i2d_PUBKEY(rpk, &data)) <= 0)
40352           return 0;
40353   
40354       ret = SSL_dane_tlsa_add(s, 3,
40355                               1,
40356                               0,
40357                               data, (size_t)ret) > 0;
40358       CRYPTO_free(data, "ssl/ssl_lib.c", 7679);
40359       return ret;
40360   }
40361   
40362   EVP_PKEY *SSL_get0_peer_rpk(const SSL *s)
40363   {
40364       SSL_CONNECTION *sc = ((s) == 
40365   # 7685 "ssl/ssl_lib.c" 3 4
40366                           ((void *)0) 
40367   # 7685 "ssl/ssl_lib.c"
40368                           ? 
40369   # 7685 "ssl/ssl_lib.c" 3 4
40370                           ((void *)0) 
40371   # 7685 "ssl/ssl_lib.c"
40372                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
40373   # 7685 "ssl/ssl_lib.c" 3 4
40374                           ((void *)0)
40375   # 7685 "ssl/ssl_lib.c"
40376                           )));
40377   
40378       if (sc == 
40379   # 7687 "ssl/ssl_lib.c" 3 4
40380                ((void *)0) 
40381   # 7687 "ssl/ssl_lib.c"
40382                     || sc->session == 
40383   # 7687 "ssl/ssl_lib.c" 3 4
40384                                       ((void *)0)
40385   # 7687 "ssl/ssl_lib.c"
40386                                           )
40387           return 
40388   # 7688 "ssl/ssl_lib.c" 3 4
40389                 ((void *)0)
40390   # 7688 "ssl/ssl_lib.c"
40391                     ;
40392       return sc->session->peer_rpk;
40393   }
40394   
40395   int SSL_get_negotiated_client_cert_type(const SSL *s)
40396   {
40397       SSL_CONNECTION *sc = ((s) == 
40398   # 7694 "ssl/ssl_lib.c" 3 4
40399                           ((void *)0) 
40400   # 7694 "ssl/ssl_lib.c"
40401                           ? 
40402   # 7694 "ssl/ssl_lib.c" 3 4
40403                           ((void *)0) 
40404   # 7694 "ssl/ssl_lib.c"
40405                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
40406   # 7694 "ssl/ssl_lib.c" 3 4
40407                           ((void *)0)
40408   # 7694 "ssl/ssl_lib.c"
40409                           )));
40410   
40411       if (sc == 
40412   # 7696 "ssl/ssl_lib.c" 3 4
40413                ((void *)0)
40414   # 7696 "ssl/ssl_lib.c"
40415                    )
40416           return 0;
40417   
40418       return sc->ext.client_cert_type;
40419   }
40420   
40421   int SSL_get_negotiated_server_cert_type(const SSL *s)
40422   {
40423       SSL_CONNECTION *sc = ((s) == 
40424   # 7704 "ssl/ssl_lib.c" 3 4
40425                           ((void *)0) 
40426   # 7704 "ssl/ssl_lib.c"
40427                           ? 
40428   # 7704 "ssl/ssl_lib.c" 3 4
40429                           ((void *)0) 
40430   # 7704 "ssl/ssl_lib.c"
40431                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
40432   # 7704 "ssl/ssl_lib.c" 3 4
40433                           ((void *)0)
40434   # 7704 "ssl/ssl_lib.c"
40435                           )));
40436   
40437       if (sc == 
40438   # 7706 "ssl/ssl_lib.c" 3 4
40439                ((void *)0)
40440   # 7706 "ssl/ssl_lib.c"
40441                    )
40442           return 0;
40443   
40444       return sc->ext.server_cert_type;
40445   }
40446   
40447   static int validate_cert_type(const unsigned char *val, size_t len)
40448   {
40449       size_t i;
40450       int saw_rpk = 0;
40451       int saw_x509 = 0;
40452   
40453       if (val == 
40454   # 7718 "ssl/ssl_lib.c" 3 4
40455                 ((void *)0) 
40456   # 7718 "ssl/ssl_lib.c"
40457                      && len == 0)
40458           return 1;
40459   
40460       if (val == 
40461   # 7721 "ssl/ssl_lib.c" 3 4
40462                 ((void *)0) 
40463   # 7721 "ssl/ssl_lib.c"
40464                      || len == 0)
40465           return 0;
40466   
40467       for (i = 0; i < len; i++) {
40468           switch (val[i]) {
40469           case 2:
40470               if (saw_rpk)
40471                   return 0;
40472               saw_rpk = 1;
40473               break;
40474           case 0:
40475               if (saw_x509)
40476                   return 0;
40477               saw_x509 = 1;
40478               break;
40479           case 1:
40480           case 3:
40481           default:
40482               return 0;
40483           }
40484       }
40485       return 1;
40486   }
40487   
40488   static int set_cert_type(unsigned char **cert_type,
40489                            size_t *cert_type_len,
40490                            const unsigned char *val,
40491                            size_t len)
40492   {
40493       unsigned char *tmp = 
40494   # 7750 "ssl/ssl_lib.c" 3 4
40495                           ((void *)0)
40496   # 7750 "ssl/ssl_lib.c"
40497                               ;
40498   
40499       if (!validate_cert_type(val, len))
40500           return 0;
40501   
40502       if (val != 
40503   # 7755 "ssl/ssl_lib.c" 3 4
40504                 ((void *)0) 
40505   # 7755 "ssl/ssl_lib.c"
40506                      && (tmp = CRYPTO_memdup((val), len, "ssl/ssl_lib.c", 7755)) == 
40507   # 7755 "ssl/ssl_lib.c" 3 4
40508                                                             ((void *)0)
40509   # 7755 "ssl/ssl_lib.c"
40510                                                                 )
40511           return 0;
40512   
40513       CRYPTO_free(*cert_type, "ssl/ssl_lib.c", 7758);
40514       *cert_type = tmp;
40515       *cert_type_len = len;
40516       return 1;
40517   }
40518   
40519   int SSL_set1_client_cert_type(SSL *s, const unsigned char *val, size_t len)
40520   {
40521       SSL_CONNECTION *sc = ((s) == 
40522   # 7766 "ssl/ssl_lib.c" 3 4
40523                           ((void *)0) 
40524   # 7766 "ssl/ssl_lib.c"
40525                           ? 
40526   # 7766 "ssl/ssl_lib.c" 3 4
40527                           ((void *)0) 
40528   # 7766 "ssl/ssl_lib.c"
40529                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
40530   # 7766 "ssl/ssl_lib.c" 3 4
40531                           ((void *)0)
40532   # 7766 "ssl/ssl_lib.c"
40533                           )));
40534   
40535       return set_cert_type(&sc->client_cert_type, &sc->client_cert_type_len,
40536                            val, len);
40537   }
40538   
40539   int SSL_set1_server_cert_type(SSL *s, const unsigned char *val, size_t len)
40540   {
40541       SSL_CONNECTION *sc = ((s) == 
40542   # 7774 "ssl/ssl_lib.c" 3 4
40543                           ((void *)0) 
40544   # 7774 "ssl/ssl_lib.c"
40545                           ? 
40546   # 7774 "ssl/ssl_lib.c" 3 4
40547                           ((void *)0) 
40548   # 7774 "ssl/ssl_lib.c"
40549                           : ((s)->type == 0 ? ( SSL_CONNECTION *)(s) : ((s)->type == 1 ? ( SSL_CONNECTION *)(( QUIC_CONNECTION *)(s))->tls : 
40550   # 7774 "ssl/ssl_lib.c" 3 4
40551                           ((void *)0)
40552   # 7774 "ssl/ssl_lib.c"
40553                           )));
40554   
40555       return set_cert_type(&sc->server_cert_type, &sc->server_cert_type_len,
40556                            val, len);
40557   }
40558   
40559   int SSL_CTX_set1_client_cert_type(SSL_CTX *ctx, const unsigned char *val, size_t len)
40560   {
40561       return set_cert_type(&ctx->client_cert_type, &ctx->client_cert_type_len,
40562                            val, len);
40563   }
40564   
40565   int SSL_CTX_set1_server_cert_type(SSL_CTX *ctx, const unsigned char *val, size_t len)
40566   {
40567       return set_cert_type(&ctx->server_cert_type, &ctx->server_cert_type_len,
40568                            val, len);
40569   }
40570   
40571   int SSL_get0_client_cert_type(const SSL *s, unsigned char **t, size_t *len)
40572   {
40573       const SSL_CONNECTION *sc = ((s) == 
40574   # 7794 "ssl/ssl_lib.c" 3 4
40575                                 ((void *)0) 
40576   # 7794 "ssl/ssl_lib.c"
40577                                 ? 
40578   # 7794 "ssl/ssl_lib.c" 3 4
40579                                 ((void *)0) 
40580   # 7794 "ssl/ssl_lib.c"
40581                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
40582   # 7794 "ssl/ssl_lib.c" 3 4
40583                                 ((void *)0)
40584   # 7794 "ssl/ssl_lib.c"
40585                                 )));
40586   
40587       if (t == 
40588   # 7796 "ssl/ssl_lib.c" 3 4
40589               ((void *)0) 
40590   # 7796 "ssl/ssl_lib.c"
40591                    || len == 
40592   # 7796 "ssl/ssl_lib.c" 3 4
40593                              ((void *)0)
40594   # 7796 "ssl/ssl_lib.c"
40595                                  )
40596           return 0;
40597   
40598       *t = sc->client_cert_type;
40599       *len = sc->client_cert_type_len;
40600       return 1;
40601   }
40602   
40603   int SSL_get0_server_cert_type(const SSL *s, unsigned char **t, size_t *len)
40604   {
40605       const SSL_CONNECTION *sc = ((s) == 
40606   # 7806 "ssl/ssl_lib.c" 3 4
40607                                 ((void *)0) 
40608   # 7806 "ssl/ssl_lib.c"
40609                                 ? 
40610   # 7806 "ssl/ssl_lib.c" 3 4
40611                                 ((void *)0) 
40612   # 7806 "ssl/ssl_lib.c"
40613                                 : ((s)->type == 0 ? (const SSL_CONNECTION *)(s) : ((s)->type == 1 ? (const SSL_CONNECTION *)((const QUIC_CONNECTION *)(s))->tls : 
40614   # 7806 "ssl/ssl_lib.c" 3 4
40615                                 ((void *)0)
40616   # 7806 "ssl/ssl_lib.c"
40617                                 )));
40618   
40619       if (t == 
40620   # 7808 "ssl/ssl_lib.c" 3 4
40621               ((void *)0) 
40622   # 7808 "ssl/ssl_lib.c"
40623                    || len == 
40624   # 7808 "ssl/ssl_lib.c" 3 4
40625                              ((void *)0)
40626   # 7808 "ssl/ssl_lib.c"
40627                                  )
40628           return 0;
40629   
40630       *t = sc->server_cert_type;
40631       *len = sc->server_cert_type_len;
40632       return 1;
40633   }
40634   
40635   int SSL_CTX_get0_client_cert_type(const SSL_CTX *ctx, unsigned char **t, size_t *len)
40636   {
40637       if (t == 
40638   # 7818 "ssl/ssl_lib.c" 3 4
40639               ((void *)0) 
40640   # 7818 "ssl/ssl_lib.c"
40641                    || len == 
40642   # 7818 "ssl/ssl_lib.c" 3 4
40643                              ((void *)0)
40644   # 7818 "ssl/ssl_lib.c"
40645                                  )
40646           return 0;
40647   
40648       *t = ctx->client_cert_type;
40649       *len = ctx->client_cert_type_len;
40650       return 1;
40651   }
40652   
40653   int SSL_CTX_get0_server_cert_type(const SSL_CTX *ctx, unsigned char **t, size_t *len)
40654   {
40655       if (t == 
40656   # 7828 "ssl/ssl_lib.c" 3 4
40657               ((void *)0) 
40658   # 7828 "ssl/ssl_lib.c"
40659                    || len == 
40660   # 7828 "ssl/ssl_lib.c" 3 4
40661                              ((void *)0)
40662   # 7828 "ssl/ssl_lib.c"
40663                                  )
40664           return 0;
40665   
40666       *t = ctx->server_cert_type;
40667       *len = ctx->server_cert_type_len;
40668       return 1;
40669   }
40670